/* Common styles shared across all applets */

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

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

.app-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: white;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.content {
    padding: 30px;
}

h2 {
    color: #5a4fcf;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.6rem;
}

/* Buttons */
.big-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    font-size: 1.3rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.big-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.big-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: #e0e0e0;
    color: #555;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 1.2rem;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 1.1rem;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    width: 100%;
    transition: border-color 0.3s ease;
}

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

.form-hint {
    font-size: 0.9rem;
    color: #888;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
}

.message.hidden {
    display: none;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.message.error {
    background: #ffebee;
    color: #c62828;
}

/* Cards */
.card {
    background: #f8f9ff;
    border: 2px solid #e0e5ff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.3rem;
    }

    .content {
        padding: 20px;
    }

    .big-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
    }

    .button-group {
        flex-direction: column;
    }
}
