* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --info-color: #17a2b8;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --bg-color: #f5f7fa;
    --card-bg: white;
    --border-color: #e0e0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dark-theme {
    --text-color: #f5f5f5;
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --border-color: #374151;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body {
    background: linear-gradient(135deg, var(--bg-color) 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

body.fullscreen {
    padding: 0;
    overflow: hidden;
}

body.fullscreen .container {
    border-radius: 0;
    height: 100vh;
    max-width: 100%;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
}

header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.header-content {
    z-index: 2;
}

.header-decoration {
    display: flex;
    gap: 15px;
    z-index: 1;
}

.decoration-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: pulse 4s infinite ease-in-out;
}

.decoration-circle:nth-child(2) {
    animation-delay: 1s;
}

.decoration-circle:nth-child(3) {
    animation-delay: 2s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.controls {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.controls-left, .controls-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table-container {
    overflow: auto;
    flex-grow: 1;
}

.planner-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.planner-table th {
    background: var(--secondary-color);
    color: white;
    padding: 15px 12px;
    text-align: left;
    position: relative;
    cursor: col-resize;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
    min-width: 120px;
}

.planner-table th i {
    margin-right: 5px;
}

.planner-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    transition: background-color 0.2s;
    min-width: 120px;
}

.actions-header, .actions-cell {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.actions-cell {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.action-btn {
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: var(--light-color);
    color: var(--text-color);
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.delete-row:hover {
    background: var(--danger-color);
    color: white;
}

.duplicate-row:hover {
    background: var(--info-color);
    color: white;
}

.planner-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.planner-table tr:hover td {
    background-color: rgba(52, 152, 219, 0.05);
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    resize: vertical;
    font-size: 14px;
    transition: all 0.3s;
    background: var(--card-bg);
    color: var(--text-color);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    cursor: col-resize;
    user-select: none;
    transition: background 0.2s;
}

.resize-handle:hover {
    background: rgba(255, 255, 255, 0.7);
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.theme-switcher button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.theme-switcher button:hover {
    background: var(--primary-color);
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: var(--success-color);
    color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls-left, .controls-right {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-decoration {
        justify-content: center;
    }
    
    .decoration-circle {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        height: calc(100vh - 20px);
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .planner-table th, 
    .planner-table td {
        padding: 8px;
    }
    
    textarea {
        min-height: 80px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .controls-left, .controls-right {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .theme-switcher button,
    #resetViewBtn {
        width: 100%;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .controls, .footer, .actions-header, .actions-cell {
        display: none;
    }
    
    body, .container {
        padding: 0;
        margin: 0;
        background: white;
        color: black;
        height: auto;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    header {
        background: #2c3e50 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .planner-table th {
        background: #34495e !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    textarea {
        border: 1px solid #ddd;
        background: white !important;
        color: black !important;
        min-height: 80px;
    }
}