/* Ether Studio - Professional Workspace CSS */

:root {
    --primary-white: #ffffff;
    --soft-white: #fafafa;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #757575;
    --text-primary: #212121;
    --text-secondary: #616161;
    --accent-blue: #2196f3;
    --accent-green: #4caf50;
    --accent-orange: #ff9800;
    --accent-red: #f44336;
    --shadow-light: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-heavy: 0 10px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--soft-white);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.header {
    background: var(--primary-white);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.logo .tagline {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 0;
}

.nav-item {
    padding: 12px 24px;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-item:hover {
    background: var(--light-gray);
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--accent-blue);
    background: rgba(33, 150, 243, 0.1);
}

/* Support for link-style navigation items */
a.nav-item {
    text-decoration: none;
    color: var(--text-secondary);
}

a.nav-item:hover {
    background: var(--light-gray);
    color: var(--text-primary);
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logout-btn {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: var(--light-gray);
    color: var(--accent-red);
}

.time-display {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
}

.status-indicator.online {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Main Content */
.main {
    min-height: calc(100vh - 140px);
    padding: 24px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Welcome Card */
.welcome-card {
    background: var(--primary-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    text-align: center;
    margin-bottom: 32px;
}

.welcome-card h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.welcome-card p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--primary-white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border-radius: 50%;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Quick Actions */
.quick-actions {
    background: var(--primary-white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.quick-actions h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.action-btn {
    background: var(--primary-white);
    border: 2px solid var(--medium-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.action-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(33, 150, 243, 0.05);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 24px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--primary-white);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    transition: var(--transition);
}

.tool-card:hover {
    box-shadow: var(--shadow-heavy);
}

.tool-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.tool-toggle {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
    color: var(--text-secondary);
}

.tool-toggle:hover {
    background: var(--light-gray);
}

.tool-content {
    padding: 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.tool-content.expanded {
    max-height: 500px;
}

/* Calculator */
.calculator {
    max-width: 300px;
    margin: 0 auto;
}

.calc-display {
    width: 100%;
    height: 60px;
    font-size: 24px;
    text-align: right;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 0 16px;
    margin-bottom: 16px;
    background: var(--light-gray);
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-buttons button {
    height: 50px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--light-gray);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.calc-buttons button:hover {
    background: var(--medium-gray);
}

.calc-equals {
    background: var(--accent-blue) !important;
    color: white !important;
    grid-row: span 2;
}

.calc-zero {
    grid-column: span 2;
}

/* Notes */
#notepad {
    width: 100%;
    height: 200px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 16px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background: var(--primary-white);
}

#notepad:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.note-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    justify-content: flex-end;
}

.note-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--accent-blue);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.note-actions button:hover {
    background: #1976d2;
}

.note-actions button:last-child {
    background: var(--medium-gray);
    color: var(--text-primary);
}

.note-actions button:last-child:hover {
    background: var(--dark-gray);
}

/* Weather Widget */
.weather-widget input {
    width: 70%;
    padding: 12px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 14px;
    margin-right: 8px;
}

.weather-widget button {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--accent-blue);
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.weather-result {
    margin-top: 16px;
    padding: 16px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    min-height: 60px;
}

/* Timer Widget */
.timer-display {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.timer-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.timer-controls input {
    width: 80px;
    padding: 8px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    text-align: center;
}

.timer-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--accent-green);
    color: white;
    cursor: pointer;
    font-size: 14px;
}

/* News */
.news-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    background: var(--primary-white);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.news-item {
    background: var(--primary-white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 16px;
    transition: var(--transition);
}

.news-item:hover {
    box-shadow: var(--shadow-medium);
}

.news-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.news-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.news-category {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.news-category.tech {
    background: rgba(33, 150, 243, 0.1);
    color: var(--accent-blue);
}

.news-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.news-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Info Section */
.info-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.info-card {
    background: var(--primary-white);
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.info-card button {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    background: var(--accent-blue);
    color: white;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 16px;
}

#serverInfoResult {
    background: var(--light-gray);
    padding: 16px;
    border-radius: var(--border-radius);
    min-height: 60px;
}

.system-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-row span:first-child {
    width: 100px;
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-row span:last-child {
    width: 40px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-orange));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Footer */
.footer {
    background: var(--primary-white);
    border-top: 1px solid var(--medium-gray);
    padding: 20px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 16px;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .nav-item {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .info-container {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}