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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.form-section {
    padding: 30px;
}

.template-selector {
    margin-bottom: 30px;
}

.template-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1rem;
}

.template-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.template-selector select:focus {
    outline: none;
    border-color: #667eea;
}

.template-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.template-form h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-section {
    text-align: center;
    margin-top: 30px;
}

#generateBtn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#generateBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#generateBtn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.messages-section {
    background: #f8f9fa;
    padding: 30px;
    border-top: 1px solid #e9ecef;
}

.messages-section h2 {
    color: #495057;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
}

.language-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
}

.tab-btn {
    background: #e9ecef;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #495057;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #dee2e6;
}

.message-container, .daily-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

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

.message-header h3 {
    color: #495057;
    font-size: 1.2rem;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn.copied {
    background: #17a2b8;
}

textarea {
    width: 100%;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    padding: 15px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea[readonly] {
    background-color: #f8f9fa;
    color: #495057;
}

.daily-updates-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #dee2e6;
}

.daily-updates-section h3 {
    color: #495057;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-section, .messages-section {
        padding: 20px;
    }
    
    .language-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 80px;
    }
    
    .message-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}

/* Animation for form transitions */
.template-form {
    animation: slideIn 0.3s ease-out;
}

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

/* Success animation for copy button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.copy-btn.copied {
    animation: pulse 0.3s ease;
}

/* WA IDT Links specific styles */
.wa-lecture-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
}

.wa-lecture-item h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.wa-lecture-item .form-group {
    margin-bottom: 15px;
}

.wa-lecture-item select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.wa-lecture-item select:focus {
    outline: none;
    border-color: #667eea;
}

.remove-lecture-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.remove-lecture-btn:hover {
    background: #c82333;
}

#add-lecture-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

#add-lecture-btn:hover {
    background: #218838;
}

/* Example text styling */
.example-text {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #dee2e6;
    border-radius: 4px;
    line-height: 1.4;
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
    user-select: none;
}

.custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-select__trigger:hover,
.custom-select.open .custom-select__trigger {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-select__arrow {
    width: 20px;
    height: 20px;
    fill: #667eea;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-select.open .custom-select__arrow {
    transform: rotate(180deg);
}

.custom-select__options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    z-index: 100;
    overflow: hidden;
}

.custom-select.open .custom-select__options {
    display: block;
    animation: dropdownIn 0.15s ease-out;
}

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

.custom-select__option {
    padding: 11px 15px;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
    transition: background 0.15s ease, color 0.15s ease;
}

.custom-select__option:hover {
    background: #f0f2ff;
    color: #667eea;
}

.custom-select__option.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

.custom-select__option[data-value=""] {
    color: #adb5bd;
    font-style: italic;
}

.custom-select--small .custom-select__trigger {
    padding: 10px 12px;
    font-size: 0.95rem;
}

.custom-select--small .custom-select__option {
    padding: 9px 12px;
    font-size: 0.95rem;
}

.optional-label {
    font-weight: 400;
    color: #adb5bd;
    font-size: 0.85rem;
}
