@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Quicksand', sans-serif;
}

body {
    background-color: #fff0f5;
    color: #6a4c62;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- LOGIN / REGISTER PAGE --- */
.container {
    background: white;
    padding: 40px 30px;
    border-radius: 25px;
    box-shadow: 0 10px 25px rgba(255, 182, 193, 0.4);
    text-align: center;
    width: 90%; 
    max-width: 380px; 
}

h2 {
    color: #ff9fb4;
    margin-bottom: 20px;
}

input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ffe4e1;
    border-radius: 15px;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: #ffb6c1;
}

.btn {
    background-color: #ffb6c1;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 15px;
    cursor: pointer;
    width: 100%;
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    transition: 0.3s;
}

.btn:hover {
    background-color: #ff9fb4;
    transform: translateY(-2px);
}

.toggle-link {
    margin-top: 15px;
    display: block;
    font-size: 14px;
    color: #a98ba2;
    text-decoration: none;
}

.toggle-link:hover {
    color: #ff9fb4;
}

/* --- Password Wrapper Fixes --- */
.password-wrapper {
    position: relative;
    width: 100%;
    margin: 10px 0;
}

.password-wrapper input {
    margin: 0;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    outline: none;
}

/* --- DASHBOARD STYLES --- */
.dashboard-body {
    display: block;
    height: auto;
    padding: 20px;
    padding-bottom: 100px; 
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 30px auto;
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap; /* Ensures buttons wrap on smaller screens */
}

.btn-small {
    background-color: #a98ba2;
    color: white;
    padding: 8px 15px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    white-space: nowrap;
}

.btn-small:hover {
    background-color: #6a4c62;
}

.active-tab {
    background-color: #ffb6c1; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    display: block; 
}

.add-item-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
    height: fit-content;
}

.add-item-card h3 {
    color: #ff9fb4;
    margin-bottom: 15px;
    text-align: center;
}

.cute-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ffe4e1;
    border-radius: 15px;
    outline: none;
    transition: 0.3s;
    background: white;
    color: #6a4c62;
}

.cute-input:focus {
    border-color: #ffb6c1;
}

.price-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.currency-select {
    width: 35%; 
}
.price-input {
    width: 65%; 
}

.form-label {
    display: block;
    text-align: left;
    margin-top: 10px;
    margin-bottom: -5px;
    padding-left: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #a98ba2;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 15px;
}

.merch-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
    position: relative;
    border-top: 5px solid #ffb6c1;
}

.wishlist-card {
    border-top: 5px solid #a98ba2;
    background: #fdf8fb;
}

.merch-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.merch-card h4 {
    margin-bottom: 15px;
    color: #6a4c62;
    font-size: 18px;
}

.merch-card p {
    font-size: 14px;
    margin-bottom: 5px;
    color: #886a80;
}

.badge {
    position: absolute;
    top: -12px;
    right: 15px;
    background: #ffb6c1;
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.card-actions {
    display: flex;
    gap: 5px;
    margin-top: 15px;
    border-top: 1px solid #ffe4e1;
    padding-top: 10px;
}

.action-btn {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: white;
    transition: 0.3s;
}

.edit-btn { background-color: #a98ba2; }
.edit-btn:hover { background-color: #886a80; }
.archive-btn { background-color: #ffb6c1; }
.archive-btn:hover { background-color: #ff9fb4; }
.delete-btn { background-color: #ff6b81; flex: 0.3; } 
.delete-btn:hover { background-color: #e0566b; }


/* --- Spending Banner --- */
.spending-banner {
    background: #fff0f5;
    border: 2px dashed #ffb6c1;
    padding: 15px;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 20px;
    color: #ff6b81;
    font-weight: bold;
    font-size: 16px;
    box-shadow: inset 0 2px 10px rgba(255, 182, 193, 0.2);
}

/* --- Search & Filter Bar --- */
.filter-bar {
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.3);
    margin-bottom: 20px;
}
.filter-input {
    flex: 2;
    margin: 0; 
}
.filter-btn {
    flex: 1;
    margin: 0;
    min-width: 100px;
}

/* --- Custom Folder Studio Styles --- */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.folder-card {
    position: relative;
    border-radius: 20px;
    height: 180px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
    display: flex;
    align-items: flex-end;
}

.folder-card:hover, 
.folder-card:active {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.folder-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.7; 
    mix-blend-mode: multiply; 
    transition: 0.3s;
}

.folder-card:hover .folder-bg,
.folder-card:active .folder-bg {
    opacity: 0.9;
    transform: scale(1.05);
}

.folder-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.folder-content h4 {
    margin: 0;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: 0.3s;
}

.folder-link {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3;
}

.delete-folder-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    background: white;
    border-radius: 50%;
    padding: 8px 10px; 
    text-decoration: none;
    font-size: 14px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.delete-folder-btn:hover {
    background-color: #ff6b81;
    color: white;
}

.color-picker {
    height: 46px; 
    padding: 2px 5px; 
    cursor: pointer;
}

/* --- Floating Accessibility Menu --- */
.floating-acc-menu {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
}

.floating-acc-btn {
    background-color: #ffb6c1;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.6);
    transition: 0.3s;
}

.floating-acc-btn:hover {
    background-color: #ff9fb4;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 182, 193, 0.8);
}

.acc-dropdown {
    display: none;
    position: absolute;
    bottom: 65px; 
    right: 0; 
    background: white;
    box-shadow: 0 -5px 25px rgba(255, 182, 193, 0.4); 
    border-radius: 15px;
    overflow: hidden;
    width: 220px; 
    max-width: 85vw; 
    border: 2px solid #ffe4e1;
    z-index: 1001; 
}

.acc-dropdown button {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-bottom: 1px solid #ffe4e1;
    background: white;
    color: #6a4c62;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.acc-dropdown button:last-child {
    border-bottom: none;
}

.acc-dropdown button:hover {
    background-color: #fff0f5;
    color: #ff9fb4;
}

/* --- Accessibility Modes --- */
body.large-text * {
    font-size: 110% !important;
}

body.high-contrast {
    background-color: #121212 !important;
    color: #ffffff !important;
}

body.high-contrast .container, 
body.high-contrast .dashboard-header, 
body.high-contrast .add-item-card, 
body.high-contrast .merch-card,
body.high-contrast .acc-dropdown,
body.high-contrast .filter-bar,
body.high-contrast .spending-banner {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
    border-color: #444 !important;
}

body.high-contrast h2, 
body.high-contrast h3, 
body.high-contrast h4,
body.high-contrast p,
body.high-contrast .form-label {
    color: #ffffff !important;
}

body.high-contrast .cute-input,
body.high-contrast .acc-dropdown button {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #555 !important;
}

body.high-contrast .acc-dropdown button:hover {
    background-color: #444 !important;
    color: #ff9fb4 !important;
}

/* 📱 --- MOBILE RESPONSIVENESS (The Magic Box) --- 📱 */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .btn-small {
        flex: 1 1 calc(33% - 10px); /* Lets buttons tile perfectly into rows on tiny screens */
        text-align: center;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* Lets 2 merch cards fit side-by-side on mobile */
    }

    .folders-grid {
        gap: 15px; 
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    }

    .folder-card {
        height: 150px; 
        border-radius: 15px;
    }

    .folder-content {
        padding: 15px; 
    }

    .folder-content h4 {
        font-size: 16px; 
    }

    .floating-acc-menu {
        bottom: 15px;
        right: 15px;
    }
}