* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #D4C4B0;
    --secondary-color: #E5D9C8;
    --accent-color: #E8D5C4;
    --success-color: #D4C9B8;
    --danger-color: #E5C4B8;
    --bg-color: #F5F1EB;
    --card-bg: #FFFEF9;
    --text-primary: #3E2723;
    --text-secondary: #4E342E;
    --border-color: #E8E0D5;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Times New Roman', Times, serif;
    background: linear-gradient(135deg, #F5EDE0 0%, #F0E6D8 50%, #EBE0D0 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-right-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-left {
    text-align: center;
    flex: 1;
}

header {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.btn-profile {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(62, 39, 35, 0.2);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-profile:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-shop-access {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(62, 39, 35, 0.2);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-shop-access:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shop-icon {
    font-size: 1.2rem;
}

.profile-icon {
    font-size: 1.2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* XP System */
.xp-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 25px;
    margin-top: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(62, 39, 35, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.xp-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.xp-label {
    font-size: 1.1rem;
}

.xp-value {
    font-size: 1.1rem;
}

.xp-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(62, 39, 35, 0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4C4B0 0%, #E5D9C8 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    width: 0%;
}

.xp-to-next {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.roots-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 12px 25px;
    margin-top: 15px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(62, 39, 35, 0.2);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.roots-container:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.roots-label {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.xp-gain-popup {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--success-color);
    color: #3E2723;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.xp-gain-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.level-up-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 3px solid var(--primary-color);
}

.level-up-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.level-up-content {
    text-align: center;
}

.level-up-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.level-up-content p {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Combined Timer and Potato Section */
.timer-potato-section {
    grid-column: 1 / -1;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.timer-potato-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 968px) {
    .timer-potato-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.timer-display-container {
    text-align: center;
}

.time {
    font-size: 4rem;
    font-weight: bold;
    color: #3E2723;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
}

.timer-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.custom-timer-selector {
    margin-top: 20px;
}

.timer-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.timer-input-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.timer-input {
    width: 70px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.3s ease;
    color: var(--text-primary);
    background: var(--card-bg);
}

.timer-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-set-time {
    padding: 8px 20px;
    font-size: 0.95rem;
}

.quick-presets {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.presets-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 5px;
}

.preset-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.preset-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #3E2723;
}

/* Potato Container */
.potato-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.potato-container {
    text-align: center;
    width: 100%;
}

.potato-name-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.potato-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-rename {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.btn-rename:hover {
    opacity: 1;
    background: var(--bg-color);
    transform: scale(1.1);
}

.potato-name-input-container {
    margin-bottom: 15px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 10px;
    width: 100%;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

.potato-name-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 8px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.potato-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.potato-name-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.potato {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #E8D5C4 0%, #D4C4B0 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    border: 3px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.potato.reading {
    transform: translateX(-15px);
}

.potato:hover {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.potato.working {
    animation: pulse 1.2s ease-in-out infinite;
}

.potato.working.reading {
    animation: pulse 1.2s ease-in-out infinite;
}

.potato.celebrating {
    animation: celebrate 0.6s ease-in-out;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-8px) rotate(-2deg); 
    }
    50% { 
        transform: translateY(-12px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-8px) rotate(2deg); 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.08);
        filter: brightness(1.1);
    }
}

@keyframes celebrate {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
    }
    20% { 
        transform: scale(1.15) rotate(-8deg);
    }
    40% { 
        transform: scale(1.15) rotate(8deg);
    }
    60% { 
        transform: scale(1.15) rotate(-8deg);
    }
    80% { 
        transform: scale(1.15) rotate(8deg);
    }
}

.potato-face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 70%;
}

.eye {
    width: 35px;
    height: 35px;
    background: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    top: 25%;
    animation: blink 4s infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.left-eye {
    left: 20%;
}

.right-eye {
    right: 20%;
}

.eye-highlight {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 20%;
    left: 25%;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

@keyframes blink {
    0%, 92%, 100% { 
        transform: scaleY(1);
        height: 35px;
    }
    94%, 96% { 
        transform: scaleY(0.1);
        height: 3px;
    }
}

.cheek {
    width: 25px;
    height: 20px;
    background: #FFB3BA;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    opacity: 0.6;
    box-shadow: 0 2px 4px rgba(255, 179, 186, 0.4);
}

.left-cheek {
    left: 5%;
}

.right-cheek {
    right: 5%;
}

.mouth {
    width: 50px;
    height: 25px;
    border: 4px solid var(--text-primary);
    border-top: none;
    border-radius: 0 0 50px 50px;
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Reading Book */
.book {
    position: absolute;
    width: 50px;
    height: 60px;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.potato.reading .book {
    opacity: 1;
    animation: bookRead 2s ease-in-out infinite;
}

.book-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #D4C4B0 0%, #C4B4A0 100%);
    border-radius: 4px 8px 8px 4px;
    position: relative;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(92, 82, 71, 0.3);
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 8px;
    width: 30px;
    height: 2px;
    background: rgba(92, 82, 71, 0.4);
    border-radius: 1px;
}

.book-cover::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 8px;
    width: 25px;
    height: 2px;
    background: rgba(92, 82, 71, 0.3);
    border-radius: 1px;
}

.book-pages {
    position: absolute;
    left: -2px;
    top: 5px;
    width: 45px;
    height: 50px;
    background: #FFFEF9;
    border-radius: 2px 6px 6px 2px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.book-pages::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 1px;
    background: rgba(92, 82, 71, 0.2);
}

.book-pages::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 8px;
    width: 25px;
    height: 1px;
    background: rgba(92, 82, 71, 0.15);
}

@keyframes bookRead {
    0%, 100% {
        transform: translateY(-50%) rotate(0deg);
    }
    50% {
        transform: translateY(-50%) rotate(-2deg);
    }
}

.potato-message {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
    min-height: 30px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Shop Section */
.shop-section {
    grid-column: 1 / -1;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.shop-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shop-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-settings {
    background: var(--primary-color);
    color: #3E2723;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-settings:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.shop-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    text-align: center;
    flex: 1;
}

.btn-close-shop {
    background: var(--danger-color);
    color: #3E2723;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-shop:hover {
    background: #D5B4A8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.shop-items[style*="display: none"] {
    display: none !important;
}

.shop-item {
    background: var(--bg-color);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.shop-item:hover {
    border-color: var(--border-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.shop-item-preview {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 50%;
    position: relative;
}

.shirt-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    position: relative;
}

.shirt-preview.shirt-blue {
    background: #4A90E2;
}

.shirt-preview.shirt-red {
    background: #E24A4A;
}

.shirt-preview.shirt-green {
    background: #4AE24A;
}

.shirt-preview.shirt-purple {
    background: #9B4AE2;
}

.shop-item-info h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.shop-item-price {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.btn-shop {
    background: var(--primary-color);
    color: #3E2723;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-shop:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-shop:disabled {
    cursor: not-allowed;
}

.btn-shop.btn-unequip {
    background: var(--accent-color);
    color: #3E2723;
}

.btn-shop.btn-unequip:hover {
    background: #D8C8B4;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.shop-coming-soon {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-color);
    border-radius: 15px;
    margin-top: 20px;
}

.coming-soon-content h3 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 15px;
}

.coming-soon-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Shop Settings Modal */
.shop-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.shop-settings-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.shop-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.shop-settings-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
}

.btn-close-settings {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-close-settings:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.shop-settings-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.setting-group {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 10px;
}

.setting-group h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.setting-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.setting-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
    line-height: 1.5;
}

.purchased-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.purchased-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.purchased-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.purchased-item.equipped {
    opacity: 0.7;
    background: var(--bg-color);
}

.purchased-item-name {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.btn-remove-item {
    background: var(--danger-color);
    color: #3E2723;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-item:hover:not(:disabled) {
    background: #D5B4A8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-remove-item:disabled {
    background: var(--accent-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.no-purchased-items {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
}

/* Potato Shirt */
.potato-shirt {
    position: absolute;
    width: 140px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    z-index: 1;
    display: none;
}

.potato-shirt.shirt-blue {
    background: #4A90E2;
    display: block;
}

.potato-shirt.shirt-red {
    background: #E24A4A;
    display: block;
}

.potato-shirt.shirt-green {
    background: #4AE24A;
    display: block;
}

.potato-shirt.shirt-purple {
    background: #9B4AE2;
    display: block;
}

/* Dress Previews */
.dress-preview {
    width: 50px;
    height: 70px;
    border-radius: 25px 25px 0 0;
    position: relative;
}

.dress-preview.dress-pink {
    background: #FFB6C1;
}

.dress-preview.dress-blue {
    background: #87CEEB;
}

.dress-preview.dress-yellow {
    background: #FFD700;
}

/* Hat Previews */
.hat-preview {
    width: 70px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 50% 50% 0 0;
    position: relative;
}

.hat-preview.hat-black {
    background: #1a1a1a;
}

.hat-preview.hat-red {
    background: #E24A4A;
}

.hat-preview.hat-blue {
    background: #4A90E2;
}

.hat-preview::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 8px;
    background: inherit;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 5px 5px;
}

/* Crown Preview */
.crown-preview {
    width: 60px;
    height: 40px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    clip-path: polygon(20% 100%, 30% 40%, 50% 60%, 70% 40%, 80% 100%);
    position: relative;
}

/* Bowtie Preview */
.bowtie-preview {
    width: 40px;
    height: 30px;
    background: #1a1a1a;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    position: relative;
}

.bowtie-preview::before,
.bowtie-preview::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #1a1a1a;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.bowtie-preview::before {
    left: -8px;
}

.bowtie-preview::after {
    right: -8px;
}

/* Mario Preview */
.mario-preview {
    width: 60px;
    height: 80px;
    position: relative;
    background: #E24A4A;
    border-radius: 30px 30px 0 0;
}

.mario-preview::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 30px;
    background: #4A90E2;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
}

.mario-preview::after {
    content: 'M';
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Potato Dress */
.potato-dress {
    position: absolute;
    width: 140px;
    height: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -20%);
    border-radius: 50% 50% 0 0;
    z-index: 1;
    display: none;
}

.potato-dress.dress-pink {
    background: #FFB6C1;
    display: block;
}

.potato-dress.dress-blue {
    background: #87CEEB;
    display: block;
}

.potato-dress.dress-yellow {
    background: #FFD700;
    display: block;
}

/* Potato Hat */
.potato-hat {
    position: absolute;
    width: 120px;
    height: 50px;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: none;
}

.potato-hat.hat-black {
    background: #1a1a1a;
    border-radius: 50% 50% 0 0;
    display: block;
}

.potato-hat.hat-red {
    background: #E24A4A;
    border-radius: 50% 50% 0 0;
    display: block;
}

.potato-hat.hat-blue {
    background: #4A90E2;
    border-radius: 50% 50% 0 0;
    display: block;
}

.potato-hat::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 12px;
    background: inherit;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 8px 8px;
}

/* Potato Crown */
.potato-crown {
    position: absolute;
    width: 100px;
    height: 60px;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    clip-path: polygon(15% 100%, 25% 30%, 50% 50%, 75% 30%, 85% 100%);
    z-index: 3;
    display: none;
}

.potato-crown.crown {
    display: block;
}

/* Potato Bowtie */
.potato-bowtie {
    position: absolute;
    width: 50px;
    height: 40px;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    z-index: 2;
    display: none;
}

.potato-bowtie.bowtie {
    display: block;
}

.potato-bowtie::before,
.potato-bowtie::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #1a1a1a;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.potato-bowtie::before {
    left: -10px;
}

.potato-bowtie::after {
    right: -10px;
}

/* Potato Mario */
.potato-mario {
    position: absolute;
    width: 180px;
    height: 180px;
    top: 0;
    left: 0;
    z-index: 1;
    display: none;
    pointer-events: none;
}

.potato-mario.mario-outfit {
    display: block;
}

.potato-mario::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 100px;
    background: #E24A4A;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.potato-mario::after {
    content: 'M';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    color: white;
    font-weight: bold;
    font-size: 2.5rem;
    z-index: 2;
}

/* Tasks Section */
.tasks-section {
    grid-column: 1 / -1;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tasks-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
}

.tasks-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.view-switcher {
    display: flex;
    gap: 5px;
    background: var(--bg-color);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.view-btn:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

.view-btn.active {
    background: var(--primary-color);
    color: #3E2723;
}

.view-container {
    min-height: 200px;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.task-input-container {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 10px;
}

.task-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

.task-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.task-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.task-input-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.task-input-field label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.task-input-small {
    padding: 8px 10px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.task-input-small:focus {
    outline: none;
    border-color: var(--primary-color);
}

.task-input-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-group {
    margin-bottom: 25px;
}

.task-group-header {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: none;
}

.task-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin-bottom: 10px;
    gap: 12px;
}

.task-item:hover {
    border-color: var(--border-color);
    transform: translateX(5px);
}

.task-item.completed {
    opacity: 0.6;
}

.task-item.overdue {
    border-left: 4px solid var(--danger-color);
}

.task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: var(--success-color);
}

.task-text {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.task-subject {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.task-due-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.task-due-date.overdue {
    color: var(--danger-color);
    font-weight: 600;
}

.task-due-date.due-today {
    color: var(--accent-color);
    font-weight: 600;
}

/* Done Section */
.done-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.done-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.done-header h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.done-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.done-task-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--bg-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.7;
}

.done-task-item:hover {
    border-color: var(--border-color);
    opacity: 1;
}

.done-task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.done-task-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.done-task-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.completed-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.done-task-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-restore,
.btn-trash {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-restore:hover {
    background: var(--success-color);
    transform: scale(1.1);
}

.btn-trash:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

.task-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: #3E2723;
}

.btn-primary:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #D4C4B0;
    color: #3E2723;
}

.btn-secondary:hover {
    background: #C4B4A0;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-add {
    background: var(--success-color);
    color: #3E2723;
    font-size: 1.1rem;
    padding: 12px 24px;
}

.btn-add:hover {
    background: #C4B4A8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-edit, .btn-delete {
    padding: 6px 12px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: var(--accent-color);
    color: #3E2723;
}

.btn-edit:hover {
    background: #D8C8B4;
}

.btn-delete {
    background: var(--danger-color);
    color: #3E2723;
}

.btn-delete:hover {
    background: #D5B4A8;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Calendar View */
.calendar-view {
    margin-top: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 10px;
}

.calendar-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.btn-calendar-nav {
    background: var(--primary-color);
    color: #3E2723;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calendar-nav:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.calendar-grid {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px;
    font-size: 0.9rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    min-height: 100px;
    background: var(--bg-color);
    border-radius: 8px;
    padding: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    border-color: var(--border-color);
    background: var(--card-bg);
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-day.today {
    border-color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.calendar-day-number {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.calendar-day-tasks {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-task {
    font-size: 0.75rem;
    padding: 3px 6px;
    border-radius: 4px;
    color: #3E2723;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.calendar-task:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

/* Board View */
.board-view {
    margin-top: 20px;
}

.board-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 968px) {
    .board-columns {
        grid-template-columns: 1fr;
    }
}

.board-column {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 15px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.column-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.column-count {
    background: var(--primary-color);
    color: #3E2723;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.column-tasks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.column-tasks.drag-over {
    background: rgba(212, 196, 176, 0.3);
    border: 2px dashed var(--primary-color);
}

.board-task-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--shadow);
    cursor: move;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.board-task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.board-task-card:active {
    cursor: grabbing;
}

.board-task-content {
    margin-bottom: 10px;
}

.board-task-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.board-task-subject {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 8px;
    margin-bottom: 5px;
    font-weight: 500;
}

.board-task-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.board-task-date.overdue {
    color: var(--danger-color);
    font-weight: 600;
}

.board-task-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.btn-edit-small,
.btn-delete-small {
    background: transparent;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.btn-edit-small:hover {
    opacity: 1;
    background: var(--accent-color);
}

.btn-delete-small:hover {
    opacity: 1;
    background: var(--danger-color);
}

/* Authentication Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.auth-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
}

.auth-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary-color);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-form h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.auth-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-auth {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.auth-error {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
    min-height: 20px;
}

/* Profile Modal */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.profile-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.profile-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
}

.btn-close-profile {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-close-profile:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-info {
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
    box-shadow: var(--shadow);
}

.profile-info h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
}

.btn-logout {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
}

