/* ========================================
   OddTurnip Utilities - Shared Styles
   ======================================== */

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

/* === Body === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    min-height: 100vh;
    padding: 10px;
}

/* === Container === */
.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* === Header === */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}
header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
header h1 .header-logo {
    height: 48px;
    width: auto;
}
header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* === Content === */
.content {
    padding: 40px 30px;
}

/* === Footer === */
.footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}
.footer a:hover {
    text-decoration: underline;
}
.footer .oddturnip-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9em;
}
.footer .oddturnip-link:hover {
    border-color: #667eea;
    background: #f8f9ff;
    text-decoration: none;
}
.footer .oddturnip-link img {
    height: 20px;
    width: auto;
}

/* === Info Box === */
.info-box {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}
.info-box h4 {
    color: #667eea;
    margin-bottom: 10px;
}
.info-box p {
    color: #666;
    line-height: 1.6;
}

/* === Control Group === */
.control-group {
    background: #f8f9ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}
.control-group h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1em;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

/* === Text Section (side by side) === */
.text-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

/* === Text Box === */
.text-box {
    flex: 1;
    min-width: 300px;
}
.text-box h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.1em;
}
.text-box textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    transition: border-color 0.3s;
}
.text-box textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}
.text-box textarea[readonly] {
    background: #f8f9ff;
    cursor: default;
}
.text-box textarea.monospace {
    font-family: 'Consolas', 'Monaco', monospace;
}

/* === Buttons === */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 2px solid #ddd;
}
.btn-secondary:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

/* === Status Messages === */
.status {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}
.status.success {
    display: block;
    background: #d4edda;
    color: #155724;
}
.status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}

/* === Radio Buttons === */
.radio-row {
    display: flex;
    gap: 30px;
    align-items: center;
}
.radio-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #555;
    font-size: 1em;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}
.radio-row label:hover {
    border-color: #667eea;
    background: #f0f4ff;
}
.radio-row input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}
.radio-row input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}
.radio-row label:has(input:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

/* === Slider === */
.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.slider-container label {
    color: #555;
    min-width: 80px;
}
.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    outline: none;
}
.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.slider-value {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* === Stats Grid === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.stat-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 10px;
    padding: 18px 15px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}
.stat-card:hover {
    border-color: #667eea;
}
.stat-card .number {
    font-size: 1.8em;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    margin-bottom: 5px;
}
.stat-card .label {
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Warning Box === */
.warning-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}
.warning-box.visible {
    display: block;
}
.warning-box h4 {
    color: #856404;
    margin-bottom: 8px;
}
.warning-box p {
    color: #856404;
    font-size: 0.9em;
}

/* === Responsive === */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    header h1 .header-logo {
        height: 36px;
    }
    .content {
        padding: 30px 20px;
    }
    .text-section {
        flex-direction: column;
    }
    .radio-row {
        flex-direction: column;
        gap: 10px;
    }
    .radio-row label {
        width: 100%;
        justify-content: center;
    }
    .slider-container {
        flex-wrap: wrap;
    }
}
