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

:root {
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: rgba(0, 0, 0, 0.05);
    --primary-gradient: linear-gradient(135deg, #a8d5e2 0%, #b8e0d2 100%);
    --secondary-gradient: linear-gradient(135deg, #c8e6f5 0%, #d4f1f4 100%);
    --accent-gradient: linear-gradient(135deg, #b3e5fc 0%, #b2ebf2 100%);
    --success-gradient: linear-gradient(135deg, #c8e6c9 0%, #dcedc8 100%);
    --danger-gradient: linear-gradient(135deg, #ffccbc 0%, #ffe0b2 100%);
    --text-primary: rgba(50, 50, 50, 0.9);
    --text-secondary: rgba(100, 100, 100, 0.8);
    --blur-amount: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #e0f2f1 50%, #f1f8e9 100%);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.25s ease;
}

.auth-overlay.hidden {
    display: none;
}

.auth-overlay-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 28px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    font-weight: 600;
    color: rgba(50, 50, 50, 0.85);
}

/* Glass morphism base styles */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

/* Login Screen */
.screen {
    min-height: 100vh;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.logo {
    font-size: 64px;
    font-weight: 800;
    background: linear-gradient(135deg, #4a90e2 0%, #5cb3a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 20px;
    color: rgba(80, 80, 80, 0.9);
    margin-bottom: 40px;
    font-weight: 500;
}

.login-language-selector {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.login-language-selector label {
    font-size: 14px;
    color: rgba(80, 80, 80, 0.9);
    font-weight: 500;
}

.login-language-selector .language-select {
    min-width: 200px;
}

.google-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: rgba(50, 50, 50, 0.9);
    padding: 16px 48px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.google-button:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.google-button:active {
    transform: translateY(0);
}

/* Main Screen */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.logo-small {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #4a90e2 0%, #5cb3a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-button {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: rgba(50, 50, 50, 0.9);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.profile-button:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section h4 {
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
}

.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.profile-actions .btn-secondary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.language-select {
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    cursor: pointer;
    min-width: 200px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.language-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), 0 8px 25px rgba(0, 0, 0, 0.15);
}

.logout-btn {
    padding: 10px 20px;
    background: rgba(255, 204, 188, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(150, 80, 60, 0.9);
    border: 1px solid rgba(255, 204, 188, 0.6);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 204, 188, 0.3);
}

.logout-btn:hover {
    background: rgba(255, 204, 188, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 204, 188, 0.4);
}

.container {
    display: flex;
    width: 100%;
    padding: 0;
    gap: 0;
    min-height: calc(100vh - 80px);
}

/* Left Navigation Menu */
.left-nav-menu {
    flex: 0 0 60px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 16px;
}

.nav-avatar-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0 4px;
}

.avatar-button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
    position: relative;
}

.avatar-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

#userInitials {
    font-weight: 700;
    color: rgba(50, 50, 50, 0.85);
}

.nav-menu-item {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(80, 80, 80, 0.7);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-menu-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: rgba(50, 50, 50, 0.9);
}

.nav-menu-item.active {
    background: var(--primary-gradient);
    color: rgba(50, 50, 50, 0.9);
    border-color: rgba(168, 213, 226, 0.6);
    box-shadow: 0 4px 15px rgba(168, 213, 226, 0.3);
}

.nav-menu-item svg {
    width: 24px;
    height: 24px;
}

/* Tooltip for nav menu items - now handled by JavaScript */
.nav-menu-item {
    z-index: 10001;
    position: relative;
}

.content-section {
    display: flex;
    flex: 1;
    gap: 0;
    min-width: 0;
    width: 100%;
    min-height: 0;
    position: relative;
}

.content-section.hidden {
    display: none !important;
}

/* Wishlist section */
#wishlistSection {
    width: 100%;
    flex-direction: column;
    padding: 32px;
    overflow-y: auto;
}

.wishlist-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.wishlist-header-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.wishlist-header-text p {
    color: var(--text-secondary);
    max-width: 520px;
}

.wishlist-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wishlist-link-card {
    padding: 24px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

.wishlist-link-card label {
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
}

.wishlist-link-input {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

#wishlistLinkInput {
    flex: 1;
    min-width: 240px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#wishlistLinkInput:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.4);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.wishlist-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.wishlist-status {
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
}

.wishlist-status.error {
    background: rgba(255, 99, 71, 0.12);
    border: 1px solid rgba(255, 99, 71, 0.3);
    color: #d84343;
}

.wishlist-status.success {
    background: rgba(129, 199, 132, 0.15);
    border: 1px solid rgba(129, 199, 132, 0.4);
    color: #2e7d32;
}

.wishlist-status.info {
    background: rgba(66, 165, 245, 0.12);
    border: 1px solid rgba(66, 165, 245, 0.3);
    color: #1e88e5;
}

.wishlist-preview-card {
    padding: 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wishlist-preview-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.wishlist-preview-thumb {
    width: 140px;
    height: 140px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.wishlist-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wishlist-preview-thumb.placeholder img {
    display: none;
}

.wishlist-preview-meta {
    flex: 1;
    min-width: 220px;
}

.wishlist-preview-meta h3 {
    margin-bottom: 8px;
}

.wishlist-preview-meta a {
    color: #1e88e5;
    font-size: 14px;
    text-decoration: none;
    word-break: break-word;
}

.wishlist-preview-meta a:hover {
    text-decoration: underline;
}

.wishlist-preview-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wishlist-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
}

.wishlist-list-column {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
}

.wishlist-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.wishlist-count-badge {
    min-width: 36px;
    text-align: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-weight: 600;
    font-size: 14px;
}

.wishlist-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wishlist-item-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.wishlist-item-thumb {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    overflow: hidden;
}

.wishlist-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wishlist-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wishlist-item-body h4 {
    margin: 0;
    font-size: 16px;
}

.wishlist-item-body a {
    font-size: 13px;
    color: #1e88e5;
    text-decoration: none;
    word-break: break-all;
}

.wishlist-item-body a:hover {
    text-decoration: underline;
}

.wishlist-item-price {
    font-weight: 600;
}

.wishlist-item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.wishlist-action-btn {
    padding: 8px 14px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wishlist-action-btn.buy {
    background: rgba(129, 199, 132, 0.25);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.3);
}

.wishlist-action-btn.gift {
    background: rgba(248, 187, 208, 0.35);
    color: #ad1457;
    border: 1px solid rgba(173, 20, 87, 0.3);
}

.wishlist-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wishlist-item-status-pill {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wishlist-item-status-pill.purchased {
    background: rgba(129, 199, 132, 0.2);
    color: #2e7d32;
}

.wishlist-item-status-pill.gifted {
    background: rgba(248, 187, 208, 0.3);
    color: #ad1457;
}

.wishlist-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    border-radius: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

/* Settings overlay */
.settings-screen {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(247, 251, 254, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.settings-screen.hidden {
    display: none;
}

.settings-container {
    width: min(1080px, 100%);
    height: min(720px, calc(100% - 48px));
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 35px 90px rgba(65, 94, 110, 0.16);
    display: flex;
    overflow: hidden;
    position: relative;
}

.settings-sidebar {
    width: 260px;
    padding: 32px 24px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(246, 252, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-sidebar-title {
    font-size: 22px;
    font-weight: 700;
    color: rgba(40, 40, 40, 0.95);
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    color: rgba(70, 70, 70, 0.9);
    transition: background 0.2s ease, color 0.2s;
}

.settings-nav-item.active,
.settings-nav-item:hover {
    background: rgba(74, 144, 226, 0.12);
    color: rgba(34, 70, 120, 0.95);
}

.settings-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    position: relative;
}

.settings-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.settings-close-btn:hover {
    transform: scale(1.05);
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.settings-section-hint {
    color: rgba(90, 90, 90, 0.85);
    margin-bottom: 16px;
}

.settings-account-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-avatar-container {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(241, 244, 248, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.settings-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.settings-avatar-initials {
    font-size: 32px;
    font-weight: 700;
    color: rgba(70, 70, 70, 0.9);
}

.settings-avatar-edit {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(74, 144, 226, 0.95);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(74, 144, 226, 0.4);
    border: 2px solid #fff;
    z-index: 2;
}

.avatar-file-input {
    display: none;
}

.settings-account-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.settings-user-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.settings-user-email {
    margin: 0;
    color: rgba(100, 100, 100, 0.85);
}

.settings-account-actions {
    display: flex;
    gap: 12px;
}

.settings-section .settings-actions {
    margin-top: 12px;
}

.avatar-crop-container {
    display: flex;
    gap: 24px;
    align-items: center;
}

.avatar-crop-wrapper {
    width: 280px;
    height: 280px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.avatar-crop-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.avatar-crop-image.dragging {
    cursor: grabbing;
}

.avatar-crop-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.avatar-crop-box {
    position: absolute;
    width: 160px;
    height: 160px;
    border: 2px dashed rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
}

.avatar-crop-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-close-btn svg {
    pointer-events: none;
}

@media (max-width: 960px) {
    .settings-container {
        flex-direction: column;
        height: calc(100% - 40px);
    }
    
    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .settings-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .settings-nav-item {
        flex: 1 0 45%;
    }
}
@media (max-width: 1024px) {
    #wishlistSection {
        padding: 24px;
    }
    
    .wishlist-preview-info {
        flex-direction: column;
    }
    
    .wishlist-preview-thumb {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 640px) {
    .wishlist-link-input {
        flex-direction: column;
    }
    
    .wishlist-preview-actions {
        flex-direction: column;
    }
}

/* Calendar section */
#calendarSection {
    flex: 1;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 0;
    overflow: hidden;
}

.sidebar {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.05);
    height: 100%;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

.sidebar.hidden {
    display: none;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

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

.channels-header h2 {
    font-size: 22px;
    color: rgba(50, 50, 50, 0.9);
    font-weight: 700;
}

.icon-button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: rgba(80, 80, 80, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.channels-list {
    list-style: none;
    margin-bottom: 15px;
}

.channels-list li {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    color: rgba(50, 50, 50, 0.9);
}

.channels-list li:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.channels-list li.active {
    background: var(--primary-gradient);
    color: rgba(50, 50, 50, 0.9);
    border-color: rgba(168, 213, 226, 0.6);
    box-shadow: 0 8px 25px rgba(168, 213, 226, 0.3);
    transform: translateX(4px);
}

.channels-list li.channel-drag-over {
    background: rgba(102, 126, 234, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.6);
    padding: 12px;
}

.channels-list li.channel-draggable {
    cursor: move;
}

.channels-list li.channel-dragging {
    opacity: 0.5;
}

.channels-list li.channel-reorder-drag-over {
    background: rgba(102, 126, 234, 0.2);
    border-top: 3px solid rgba(255, 255, 255, 0.8);
}

.channel-name {
    flex: 1;
    user-select: none;
    font-weight: 500;
}

.channel-task-count {
    font-size: 12px;
    color: rgba(80, 80, 80, 0.8);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
    min-width: 22px;
    text-align: center;
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.channels-list li.active .channel-task-count {
    background: rgba(255, 255, 255, 0.7);
    color: rgba(50, 50, 50, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
}

.channels-list li.channel-separator {
    height: 2px !important;
    min-height: 2px !important;
    max-height: 2px !important;
    background: linear-gradient(90deg, transparent, rgba(200, 230, 245, 0.5), transparent) !important;
    margin: 12px 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: default;
    pointer-events: none;
    list-style: none;
    flex: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    align-items: unset;
    justify-content: unset;
    position: static;
}

.main-content {
    flex: 1;
    display: flex;
    gap: 0;
    min-width: 0;
}

.tasks-column {
    flex: 1;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.task-detail {
    flex: 0 0 380px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    height: 100%;
    min-height: 0;
}

.task-detail::-webkit-scrollbar {
    width: 8px;
}

.task-detail::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.task-detail::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.task-detail::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.task-detail:empty::before {
    content: 'Выберите задачу, чтобы увидеть детали';
    display: block;
    color: rgba(150, 150, 150, 0.7);
    text-align: center;
    padding: 40px 20px;
}

.calendar-inspector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-inspector-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-inspector-date {
    font-size: 18px;
    font-weight: 700;
    color: rgba(40, 40, 40, 0.95);
    margin: 0;
}

.calendar-inspector-summary {
    margin: 0;
    font-size: 14px;
    color: rgba(100, 100, 100, 0.85);
}

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

.calendar-inspector-item {
    border: 1px solid rgba(230, 235, 243, 0.9);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    text-align: left;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-inspector-item:hover {
    border-color: rgba(168, 213, 226, 0.8);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.calendar-inspector-item.selected {
    border-color: rgba(74, 144, 226, 0.9);
    background: rgba(74, 144, 226, 0.12);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.18);
}

.calendar-inspector-item-title {
    font-weight: 600;
    color: rgba(40, 40, 40, 0.95);
}

.calendar-inspector-item-meta {
    font-size: 13px;
    color: rgba(110, 110, 110, 0.85);
}

.calendar-inspector-empty {
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed rgba(0, 0, 0, 0.08);
    color: rgba(120, 120, 120, 0.85);
}

.task-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.task-detail-header h3 {
    font-size: 22px;
    color: rgba(50, 50, 50, 0.9);
    font-weight: 700;
}

.detail-title-input {
    font-size: 22px;
    font-weight: 700;
    color: rgba(50, 50, 50, 0.9);
    border: none;
    background: transparent;
    padding: 0;
    width: 100%;
    cursor: pointer;
    outline: none;
}

.detail-title-input:read-only {
    cursor: pointer;
}

.detail-title-input:not(:read-only) {
    cursor: text;
    border-bottom: 2px solid rgba(168, 213, 226, 0.6);
    padding-bottom: 4px;
    background: rgba(255, 255, 255, 0.4);
    padding: 8px;
    border-radius: 8px;
}

.close-detail-btn {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    font-size: 24px;
    color: rgba(80, 80, 80, 0.8);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.close-detail-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: rgba(50, 50, 50, 0.9);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.detail-subtitle {
    font-size: 14px;
    color: rgba(120, 120, 120, 0.8);
    margin-top: 6px;
}

.detail-section-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: rgba(50, 50, 50, 0.9);
    margin-bottom: 10px;
}

.detail-description {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    padding: 12px;
    border: 2px solid rgba(200, 230, 245, 0.8);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.detail-description:focus {
    outline: none;
    border-color: rgba(168, 213, 226, 1);
    box-shadow: 0 0 0 3px rgba(168, 213, 226, 0.3), 0 4px 15px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
}

.task-detail-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(200, 230, 245, 0.3);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(200, 230, 245, 0.7);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(50, 50, 50, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(168, 213, 226, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.deadline-btn {
    align-self: flex-start;
}

.deadline-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.deadline-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: currentColor;
}

#deadlineBtnText {
    font-weight: 500;
    color: rgba(50, 50, 50, 0.9);
}

.detail-subtasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
    color: rgba(50, 50, 50, 0.9);
    margin-bottom: 12px;
    margin-top: 24px;
}

.detail-subtasks-header span {
    font-size: 15px;
    font-weight: 700;
    color: rgba(50, 50, 50, 0.9);
}

.subtask-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(200, 230, 245, 0.8);
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.subtask-input:focus {
    outline: none;
    border-color: rgba(168, 213, 226, 1);
    box-shadow: 0 0 0 3px rgba(168, 213, 226, 0.3), 0 4px 15px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
}

.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.content-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
}

.content-header h2 {
    font-size: 28px;
    color: rgba(50, 50, 50, 0.9);
    font-weight: 800;
}

.task-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(200, 230, 245, 0.8);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-input::placeholder {
    color: rgba(100, 100, 100, 0.6);
}

.task-input:focus {
    outline: none;
    border-color: rgba(168, 213, 226, 1);
    box-shadow: 0 0 0 3px rgba(168, 213, 226, 0.3), 0 4px 15px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.task-input:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.6;
}

.add-btn {
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border-left: 4px solid rgba(168, 213, 226, 0.8);
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.task-item.task-highlight {
    animation: calendarHighlight 1.2s ease;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.5), 0 8px 20px rgba(66, 133, 244, 0.15);
}

.task-item.selected {
    border-left-color: rgba(168, 213, 226, 1);
    box-shadow: 0 0 0 4px rgba(168, 213, 226, 0.3), 0 8px 25px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    transform: translateX(4px);
}

.task-item.dragging {
    opacity: 0.6;
    transform: rotate(2deg);
}

.task-item.drag-over {
    border: 2px dashed rgba(168, 213, 226, 0.8);
    background: rgba(168, 213, 226, 0.2);
}

@keyframes calendarHighlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.6), 0 8px 20px rgba(66, 133, 244, 0.2);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.3), 0 6px 16px rgba(66, 133, 244, 0.15);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0), 0 4px 12px rgba(0, 0, 0, 0.05);
    }
}

.task-item.completed {
    opacity: 0.7;
    border-left-color: rgba(200, 230, 201, 0.8);
    cursor: default;
    background: rgba(200, 230, 201, 0.2);
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: rgba(120, 120, 120, 0.7);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid rgba(200, 230, 201, 0.6);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-checkbox:hover {
    border-color: rgba(200, 230, 201, 0.9);
    transform: scale(1.1);
}

.task-checkbox:checked {
    background: var(--success-gradient);
    border-color: rgba(200, 230, 201, 1);
    box-shadow: 0 4px 15px rgba(200, 230, 201, 0.4);
}

.task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.subtask-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    color: rgba(100, 150, 180, 0.9);
    flex-shrink: 0;
    opacity: 1;
}

.subtask-icon svg {
    display: block;
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.task-title {
    flex: 1;
    font-size: 16px;
    color: rgba(50, 50, 50, 0.9);
    font-weight: 500;
}

.subtask-title-editable {
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: rgba(50, 50, 50, 0.9);
}

.subtask-title-editable:hover {
    background: rgba(255, 255, 255, 0.5);
}

.subtask-title-editable[contenteditable="true"] {
    background: rgba(255, 255, 255, 0.7);
    outline: 2px solid rgba(168, 213, 226, 0.6);
    outline-offset: -2px;
}

.task-deadline {
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.task-deadline.deadline-normal {
    color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
}

.task-deadline.deadline-urgent {
    color: #ea4335;
    background: rgba(234, 67, 53, 0.1);
    font-weight: 600;
}

.task-title-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-channel-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(50, 50, 50, 0.9);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-badge {
    background: rgba(168, 213, 226, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(50, 50, 50, 0.9);
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(168, 213, 226, 0.5);
    cursor: default;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-badge.origin {
    cursor: default;
}

.task-badge.toggle-today {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    color: rgba(50, 50, 50, 0.9);
}

.task-badge.toggle-today:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}

.task-badge.toggle-today.active {
    background: rgba(255, 245, 157, 0.6);
    color: rgba(50, 50, 50, 0.9);
    box-shadow: 0 4px 15px rgba(255, 245, 157, 0.4);
}

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

.completed-section {
    margin-top: 28px;
    border-top: 1px solid rgba(200, 230, 245, 0.5);
    padding-top: 20px;
}

.completed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: rgba(100, 100, 100, 0.9);
    font-size: 15px;
    margin-bottom: 14px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.completed-header:hover {
    background: rgba(255, 255, 255, 0.4);
}

.completed-header span {
    font-weight: 700;
}

.task-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.task-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.task-btn.delete {
    background: rgba(255, 204, 188, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(150, 80, 60, 0.9);
    border: 1px solid rgba(255, 204, 188, 0.6);
    box-shadow: 0 4px 15px rgba(255, 204, 188, 0.3);
}

.task-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.6);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(80, 80, 80, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-icon-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.task-item:hover .task-icon-btn {
    opacity: 1;
}

.today-btn {
    background-color: transparent !important;
    font-size: 22px;
    opacity: 0;
    filter: brightness(1);
}

.today-btn.active {
    opacity: 0.8;
    filter: brightness(1.2);
}

.task-item:hover .today-btn {
    opacity: 1;
    background-color: transparent;
}

.task-item:hover .today-btn:hover {
    background: rgba(255, 245, 157, 0.5);
    border: 1px solid rgba(255, 245, 157, 0.7);
    border-radius: 10px;
    transform: scale(1.15);
}

.task-item:hover .today-btn.active {
    opacity: 1;
    filter: brightness(1.1);
    background: rgba(255, 245, 157, 0.6);
}

.task-icon-btn[data-tooltip] {
    position: relative;
}

.task-icon-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1000;
    opacity: 1;
    transition: none;
    animation: tooltipFadeIn 0.1s ease-out;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.task-icon-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 1000;
    opacity: 1;
    transition: none;
    animation: tooltipFadeIn 0.1s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 36px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.7);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin-bottom: 16px;
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 800;
}

.modal-content p {
    margin-bottom: 28px;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-content input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(200, 230, 245, 0.8);
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal-content input:focus {
    outline: none;
    border-color: rgba(168, 213, 226, 1);
    box-shadow: 0 0 0 3px rgba(168, 213, 226, 0.3), 0 4px 15px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 1);
}

.modal-content input::placeholder {
    color: rgba(100, 100, 100, 0.6);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary {
    padding: 12px 24px;
    background: rgba(74, 144, 226, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(74, 144, 226, 0.6);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: rgba(74, 144, 226, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.import-status {
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 24px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.import-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: -10px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.import-hint code {
    font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        flex: 0 0 auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .main-content {
        flex-direction: column;
    }

    .task-detail {
        flex: 0 0 auto;
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        max-height: 50vh;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .logo {
        font-size: 48px;
    }

    .subtitle {
        font-size: 18px;
    }
}

/* Loader styles */
.loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(168, 213, 226, 0.3);
    border-top: 3px solid rgba(168, 213, 226, 0.9);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 16px;
}

.loader-text {
    color: rgba(80, 80, 80, 0.9);
    font-size: 15px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-large {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.loader-small {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.initial-loader.hidden {
    display: none;
}

/* Channel actions */
.channel-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

.channel-actions .btn-secondary {
    background: rgba(255, 204, 188, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(150, 80, 60, 0.9);
    border: 1px solid rgba(255, 204, 188, 0.7);
}

.channel-actions .btn-secondary:hover {
    background: rgba(255, 204, 188, 1);
    box-shadow: 0 8px 25px rgba(255, 204, 188, 0.5);
}

/* Modal warning styles */
.modal-warning {
    color: rgba(200, 100, 80, 0.9);
    font-weight: 700;
    margin-top: 16px;
    font-size: 15px;
}

.modal-consequences {
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn-danger {
    background: rgba(255, 204, 188, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: rgba(150, 80, 60, 0.9) !important;
    border: 1px solid rgba(255, 204, 188, 0.7) !important;
    box-shadow: 0 4px 15px rgba(255, 204, 188, 0.4) !important;
}

.btn-danger:hover {
    background: rgba(255, 204, 188, 1) !important;
    box-shadow: 0 8px 25px rgba(255, 204, 188, 0.5) !important;
}

.assistant-chat-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(200, 230, 245, 0.5);
}

#assistantChatSoon {
    opacity: 0.7;
    padding: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    color: rgba(120, 120, 120, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Deadline Dropdown Styles */
.deadline-dropdown {
    position: fixed;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 16px;
    min-width: 280px;
}

.deadline-dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deadline-calendar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: rgba(50, 50, 50, 0.9);
}

.calendar-nav-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(200, 230, 245, 0.6);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(168, 213, 226, 0.8);
}

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

.calendar-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(100, 100, 100, 0.7);
    padding: 6px 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(50, 50, 50, 0.9);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.calendar-day:hover {
    background: rgba(168, 213, 226, 0.3);
}

.calendar-day.prev-month,
.calendar-day.next-month {
    color: rgba(150, 150, 150, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.calendar-day.today {
    background: rgba(168, 213, 226, 0.4);
    font-weight: 600;
}

.calendar-day.selected {
    background: rgba(168, 213, 226, 0.9);
    color: white;
    font-weight: 600;
}

.deadline-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid rgba(200, 230, 245, 0.3);
}

.deadline-clear-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(200, 230, 245, 0.6);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.deadline-clear-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(168, 213, 226, 0.8);
}

/* Channel urgent deadline highlight */
.channels-list li.has-urgent-deadline {
    border-left: 4px solid #ea4335;
    background: rgba(234, 67, 53, 0.1);
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% {
        background: rgba(234, 67, 53, 0.1);
    }
    50% {
        background: rgba(234, 67, 53, 0.15);
    }
}

/* Calendar Styles */
.calendar-container {
    width: 100%;
    min-height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    box-sizing: border-box;
    align-items: stretch;
    justify-content: flex-start;
}

.calendar-container > .calendar-grid-main {
    width: 100%;
}

.calendar-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    flex-shrink: 0;
    width: 100%;
}

.calendar-header-main h2 {
    font-size: 28px;
    font-weight: 800;
    color: rgba(50, 50, 50, 0.9);
    flex: 1;
    text-align: center;
    margin: 0;
}

.calendar-nav-btn-large {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(200, 230, 245, 0.6);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 24px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.calendar-nav-btn-large:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(168, 213, 226, 0.8);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.calendar-grid-main {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 14px;
    width: 100%;
    flex: 1 1 auto;
    min-height: 620px;
    align-items: stretch;
}

.calendar-day-header-main {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: rgba(100, 100, 100, 0.8);
    padding: 12px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day-cell {
    min-height: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 600;
    color: rgba(50, 50, 50, 0.9);
    cursor: default;
    overflow: hidden;
}

.calendar-day-cell:hover,
.calendar-day-cell.selected {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.calendar-day-cell.other-month {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.2);
}

.calendar-day-cell.today {
    border: 2px solid rgba(168, 213, 226, 0.8);
    background: rgba(168, 213, 226, 0.2);
    box-shadow: 0 4px 15px rgba(168, 213, 226, 0.2);
}

.calendar-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 600;
    color: rgba(50, 50, 50, 0.9);
}

.calendar-day-count {
    font-size: 11px;
    font-weight: 600;
    color: rgba(120, 120, 120, 0.85);
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    padding: 2px 6px;
}

.calendar-day-count.empty {
    opacity: 0.5;
}

.calendar-day-tasks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    min-height: 0;
    margin-top: 4px;
}

.calendar-day-more {
    font-size: 12px;
    font-weight: 600;
    color: rgba(120, 120, 120, 0.8);
    text-align: right;
}

.calendar-task-item {
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.calendar-task-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-task-item.completed {
    background: rgba(200, 230, 201, 0.5);
    color: rgba(100, 100, 100, 0.8);
    text-decoration: line-through;
    border-left-color: rgba(200, 230, 201, 0.8);
}

.calendar-task-item.deadline-normal {
    border-left-color: rgba(66, 133, 244, 0.8);
    background: rgba(66, 133, 244, 0.1);
    color: rgba(50, 50, 50, 0.9);
}

.calendar-task-item.deadline-urgent {
    border-left-color: #ea4335;
    background: rgba(234, 67, 53, 0.15);
    color: #ea4335;
    font-weight: 600;
}

.calendar-task-item.deadline-overdue {
    border-left-color: #ea4335;
    background: rgba(234, 67, 53, 0.2);
    color: #ea4335;
    font-weight: 700;
}

.calendar-day-cell::-webkit-scrollbar {
    width: 4px;
}

.calendar-day-cell::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.calendar-day-cell::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.calendar-day-cell::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.calendar-loading,
.calendar-error {
    grid-column: span 7;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: rgba(80, 80, 80, 0.85);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    text-align: center;
    padding: 16px;
}

.calendar-error {
    color: #ea4335;
}
