:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --success-color: #16a34a;
    --error-color: #dc2626;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
}

main {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

section {
    padding: 40px;
}

.info-section {
    background: linear-gradient(to bottom, #f8fafc, white);
    border-bottom: 1px solid var(--border-color);
}

.info-section h2 {
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 1.75rem;
}

.steps {
    display: grid;
    gap: 20px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.step-content h3 {
    color: var(--text-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.step-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.step-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.step-content a:hover {
    text-decoration: underline;
}

.generator-section h2 {
    color: var(--text-color);
    margin-bottom: 25px;
    font-size: 1.75rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.result {
    margin-top: 30px;
    padding: 25px;
    background: #f0fdf4;
    border: 2px solid var(--success-color);
    border-radius: 12px;
}

.result h3 {
    color: var(--success-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.calendar-link {
    margin-bottom: 25px;
}

.calendar-link label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.link-container {
    display: flex;
    gap: 10px;
}

.link-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    user-select: all;
    -webkit-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
}

.link-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-copy {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-copy:hover {
    opacity: 0.9;
}

.instructions {
    margin-top: 25px;
}

.instructions h4 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.platform-instructions details {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
}

.platform-instructions summary {
    font-weight: 600;
    color: var(--text-color);
    user-select: none;
}

.platform-instructions details[open] summary {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.platform-instructions ol {
    margin-left: 20px;
    color: var(--text-light);
}

.platform-instructions li {
    margin: 5px 0;
}

.note {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.error {
    margin-top: 20px;
    padding: 15px;
    background: #fef2f2;
    border: 2px solid var(--error-color);
    border-radius: 8px;
    color: var(--error-color);
}

.loading {
    margin-top: 30px;
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 30px;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer .small {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 5px;
}

.info-box {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.info-box strong {
    display: block;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 25px;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .link-container input {
        font-size: 1rem;
        padding: 16px;
        /* Make it easier to tap and select on mobile */
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
    }
    
    .btn-copy {
        width: 100%;
        padding: 16px;
        font-size: 1rem;
        /* Minimum touch target size for mobile */
        min-height: 44px;
    }
    
    /* Make form inputs more touch-friendly */
    input[type="text"],
    input[type="url"],
    select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 14px;
    }
    
    button[type="submit"] {
        font-size: 1rem;
        padding: 16px;
        min-height: 44px;
    }
}

/* Footer Legal Section */
.footer-legal {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.footer-legal hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.legal-text {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.legal-text strong {
    color: white;
    display: block;
    margin-bottom: 0.5rem;
}

.legal-text a {
    color: #a78bfa;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-text a:hover {
    color: #c4b5fd;
}

.copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
}

.copyright a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: rgba(255, 255, 255, 0.9);
}

