/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

/* Header Top Row with Hamburger */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.header-top h1 {
    margin-bottom: 0;
}

header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.current-date {
    color: #666;
    font-size: 1rem;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-add {
    width: 100%;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Hamburger Menu Button */
.btn-menu {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #667eea;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    transition: color 0.3s ease, transform 0.2s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-menu:hover {
    color: #5568d3;
    transform: scale(1.1);
}

.btn-menu:active {
    transform: scale(0.95);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    min-width: 180px;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu Items */
.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: none;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item:active {
    background: #ebebeb;
}

.menu-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.menu-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #667eea;
    font-weight: bold;
}

/* Website List */
.website-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.website-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    transition: all 0.3s ease;
    position: relative;
}

.website-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.website-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.website-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.frequency-badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.website-url {
    color: #667eea;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    margin-bottom: 10px;
    word-break: break-all;
}

.website-url:hover {
    text-decoration: underline;
}

.website-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.last-checked {
    color: #666;
    font-size: 0.9rem;
}

.btn-delete {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

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

/* Empty States */
.empty-state,
.first-time-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state p:first-child,
.first-time-message p:first-child {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
}

.first-time-message p:last-child {
    font-size: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.btn-close:hover {
    color: #333;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Import Confirmation Modal Styles */
.import-preview {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.import-info {
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.import-info:last-child {
    margin-bottom: 0;
}

.import-current-info {
    margin-bottom: 20px;
    color: #666;
}

.import-current-info p {
    margin-bottom: 8px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f9f9ff;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 4px;
    cursor: pointer;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-description {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .header-top h1 {
        font-size: 2rem;
    }

    /* Menu adjustments */
    .dropdown-menu {
        right: -10px;
        min-width: 160px;
    }

    .btn-menu {
        font-size: 1.6rem;
        padding: 4px 8px;
    }

    .menu-item {
        padding: 14px 12px;
    }

    .website-header {
        flex-direction: column;
        gap: 10px;
    }

    .frequency-badge {
        align-self: flex-start;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }
}
