* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --accent: #f093fb;
    --danger: #ff6b6b;
    --success: #51cf66;
    --bg: #f7f9fc;
    --bg-dark: #0f172a;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(102, 126, 234, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}


/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.logo img, .wave-button img {
    height: 4rem;
    vertical-align: middle;
    border-radius: 50%;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Floating logo Button */
.wave-button {
    position: fixed;
    top: 3rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.wave-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.wave-button:active {
    transform: scale(0.95);
}

.wave-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Floating Menu */
.wave-menu {
    position: fixed;
    top: 7rem;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 0;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    min-width: 400px;

    animation: slideIn 0.3s ease;
}

body.dark-mode .wave-menu {
    background: #2d3748;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wave-menu-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dev-message {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

body.dark-mode .dev-message {
    color: #a5f3fc;
}

.dev-text {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

body.dark-mode .dev-text {
    color: #cbd5e0;
}

.email-link {
    display: block;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 8px 0;
}

body.dark-mode .email-link {
    background: rgba(102, 126, 234, 0.15);
}

.email-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.email-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
    text-align: center;
    font-style: italic;
}

body.dark-mode .email-hint {
    color: #a0aec0;
}

@media (max-width: 768px) {
    .wave-button {
        top: 2rem;
        right: 1rem;
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }

    .wave-menu {
        top: 5.7rem;
        right: 10px;
        min-width: 280px;
        max-width: 90vw;
    }

    .wave-menu-content {
        padding: 16px;
    }
}

/* Floating Theme Toggle Button */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 1.8rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.floating-btn:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.floating-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .floating-btn, .wave-button {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
}


/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Panel */
.search-panel {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

body.dark-mode .search-panel {
    background: #2d3748;
    color: var(--text);
}

.search-panel h2 {
    margin-bottom: 20px;
    color: var(--text);
}

.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
    color: var(--text);
}

body.dark-mode .search-input {
    background: #1a202c;
    color: var(--text);
    border-color: #4a5568;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-search {
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.search-hint {
    font-size: 0.9rem;
    color: var(--text-light);
}

.error-message {
    background: #ffebee;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid var(--danger);
    margin-top: 15px;
}

body.dark-mode .error-message {
    background: #742c2c;
    color: #ff8787;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

body.dark-mode .section-card {
    background: #2d3748;
}

.section-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    padding: 20px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    transition: all 0.3s ease;
}

body.dark-mode .section-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.15));
    border-color: #4a5568;
}

.section-header h3 {
    color: var(--text);
    font-size: 1.2rem;
}

/* News Filters */
.news-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(240, 147, 251, 0.05));
    border-radius: 8px;
    flex-wrap: wrap;
}

body.dark-mode .news-filters {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
}

.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

body.dark-mode .filter-group select {
    background: #1a202c;
    border-color: #4a5568;
    color: var(--text);
}

.filter-group select:hover {
    border-color: var(--primary);
}

.jobs-container,
.news-container {
    padding: 20px;
    min-height: 400px;
}

.result-count {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    padding: 12px 16px;
    border-radius: 6px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
}

body.dark-mode .result-count {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(240, 147, 251, 0.2));
}

.job-header {
    margin-bottom: 20px;
}

.job-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.job-company {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 12px 0;
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 12px;
    background: var(--bg);
    border-radius: 6px;
    transition: all 0.3s ease;
}

body.dark-mode .job-meta {
    background: #1a202c;
}

.job-snippet {
    background: var(--bg);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: var(--text-light);
    line-height: 1.6;
    transition: all 0.3s ease;
}

body.dark-mode .job-snippet {
    background: #1a202c;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    min-width: 150px;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.btn-small:active {
    transform: translateY(0);
}

.apply-link {
    padding: 10px 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
}

body.dark-mode .apply-link {
    background: rgba(102, 126, 234, 0.15);
}

.apply-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}


/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

body.dark-mode .pagination {
    border-color: #4a5568;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: var(--text);
    min-width: 36px;
    text-align: center;
}

body.dark-mode .pagination-btn {
    background: #1a202c;
    border-color: #4a5568;
    color: var(--text);
}

.pagination-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.pagination-btn-active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    font-weight: 700;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-prev,
.pagination-next {
    min-width: auto;
}

.pagination-number {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: 10px;
}

.news-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

body.dark-mode .news-item {
    border-bottom-color: #4a5568;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: var(--bg);
    padding: 10px;
    border-radius: 8px;
}

body.dark-mode .news-item:hover {
    background: #1a202c;
}

.news-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.news-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

.news-title:hover {
    color: var(--primary);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
    flex-wrap: wrap;
    gap: 10px;
}

.news-source {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.news-summary {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.news-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.news-link:hover {
    text-decoration: underline;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.modal-overlay.active {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body.dark-mode .modal {
    background: #2d3748;
    color: var(--text);
}

.modal.active {
    display: block;
}

.modal-content {
    padding: 30px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text);
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.detail-list {
    list-style: none;
}

.detail-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text);
}

.detail-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.detail-text {
    color: var(--text);
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.btn-done {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-done:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

body.dark-mode .spinner {
    border-color: #4a5568;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 20px 15px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .search-row {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
    }

    .modal {
        width: 95%;
        max-height: 85vh;
    }

    .modal-content {
        padding: 20px;
    }

    .pagination {
        justify-content: center;
        gap: 4px;
    }

    .pagination-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .pagination-number {
        min-width: 32px;
        height: 32px;
    }

    .news-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .button-row {
        flex-direction: column;
    }

    .btn-small {
        width: 100%;
    }
}