/* color palette */
:root {
    --menu-orange: rgba(244, 162, 97, 0.95); 
    --menu-text: #2C3E50;
    --blueish-divider: #4A90E2;              
    --blue-btn-hover: #357ABD;
    --blue-btn-active: #234E7A;
    --active-item-glow: #F4F7F6;
    --border-color: rgba(74, 144, 226, 0.4);   
    --hover-color: rgba(255, 255, 255, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1B2A4A, #3A4F7C, #E07A5F, #F4A261, #E9C46A);
    background-size: 400% 400%;
    animation: sunriseAnimation 7s ease-out forwards; 
    height: 100vh;
    overflow: hidden;
}

@keyframes sunriseAnimation {
    0% { background-position: 0% 0%; }
    50% { background-position: 50% 50%; }
    100% { background-position: 100% 100%; } 
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* sidebar panels */
.sidebar, 
.preview-panel {
    width: 250px;
    background-color: var(--menu-orange);
    color: var(--menu-text);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar {
    border-right: 3px solid var(--blueish-divider);
}

.preview-panel {
    width: 320px;
    border-left: 3px solid var(--blueish-divider);
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--menu-text);
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--blueish-divider); 
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    background-color: var(--blueish-divider);
    border: none;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.95rem;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 500;
}

.nav-btn:hover {
    background-color: var(--blue-btn-hover);
    transform: translateX(3px);
}

.nav-btn.active {
    background-color: var(--blue-btn-active);
    color: white;
    font-weight: bold;
    border-left: 5px solid #FFF;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.create-btn {
    background-color: #2C3E50; 
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 15px;
}

.create-btn:hover {
    background-color: #1A252F;
}

/* content area*/
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.top-bar {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid var(--blueish-divider); 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    backdrop-filter: blur(5px);
}

.search-wrapper input {
    width: 300px;
    padding: 10px 16px;
    border: 2px solid var(--blueish-divider);
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
    background-color: rgba(255,255,255,0.7);
}

.current-folder-title {
    font-weight: bold;
    color: #2C3E50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* file grid setup */
.file-grid {
    flex-grow: 1;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: max-content;
    gap: 20px;
    overflow-y: auto;
}

/*item cards */
.profile-card {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    background-color: white;
}

.profile-card.selected {
    border: 3px solid var(--blueish-divider);
    background-color: white;
}

/* badge shape */
.card-icon-circle-badge {
    width: 65px;
    height: 65px;
    background-color: var(--menu-orange);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--blueish-divider);
    font-size: 2.3rem; 
}

.badge-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-name {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--menu-text);
}

/* preview setup area */
.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--menu-text);
    opacity: 0.8;
    text-align: center;
    font-weight: 500;
}

.preview-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-header-card {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--blueish-divider);
}

/* sidebar preview badge*/
.profile-avatar-badge {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px auto;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    background-color: #FFF2E6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.8rem;
}

.profile-avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-tag {
    display: inline-block;
    background-color: var(--blueish-divider);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 8px;
}

.profile-details h3 {
    font-size: 0.85rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(74, 144, 226, 0.3);
    padding-bottom: 2px;
}

.profile-details p {
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

/* action buttons footer */
.preview-actions {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid var(--blueish-divider);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.preview-actions button {
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.preview-actions button:active {
    transform: scale(0.98);
}

.edit-btn {
    background-color: var(--blueish-divider);
    color: white;
}

.edit-btn:hover {
    background-color: var(--blue-btn-hover);
}

.delete-btn {
    background-color: #7A1C1C;
    color: white;
}

.delete-btn:hover {
    background-color: #B83C3C;
}

.avatar-selection-dashboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hidden-file-input {
    display: none;
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.emoji-opt {
    background-color: white;
    border: 2px solid #BDC3C7;
    font-size: 1.5rem;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-opt:hover {
    background-color: #FFF2E6; 
    border-color: var(--menu-orange);
    transform: scale(1.05);
}

.emoji-opt.active {
    border-color: var(--blue-btn-active);
    background-color: #D6EAF8;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.custom-upload-trigger {
    background-color: #E2E8F0;
    font-size: 1.2rem;
    color: #5D6D7E;
}

.form-select {
    padding: 10px;
    border: 2px solid #BDC3C7;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    background-color: white;
    cursor: pointer;
    color: var(--menu-text);
    font-weight: 500;
}

.form-select:focus {
    border-color: var(--blue-btn-hover);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(27, 42, 74, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background-color: #EBF3FC; 
    width: 460px;
    max-width: 95%;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    border: 4px solid var(--blueish-divider); 
}

.modal-box h2 {
    font-size: 1.4rem;
    color: #234E7A;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--blueish-divider);
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #34495E;
    text-transform: uppercase;
}

.form-group input, 
.form-group textarea {
    padding: 10px;
    border: 2px solid #BDC3C7;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    background-color: white;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--blue-btn-hover);
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.btn-secondary {
    background-color: #BDC3C7;
    color: #2C3E50;
}

.btn-secondary:hover {
    background-color: #95A5A6;
}

.btn-primary {
    background-color: var(--blueish-divider);
    color: white;
}

.btn-primary:hover {
    background-color: var(--blue-btn-hover);
}

.hidden {
    display: none !important;
}
