/* Ratkaisija / ToolForIt - Main Styles */

* {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: background 0.5s ease;
}

/* Brand-neutral theme (same on all domains) */

/* Floating questions background */
.floating-questions {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-q {
    position: absolute;
    top: 100%;
    color: rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    animation: floatUp 25s linear infinite;
}

@keyframes floatUp {
    0% { 
        transform: translateY(0); 
        opacity: 0;
    }
    2% { opacity: 1; }
    95% { opacity: 1; }
    100% { 
        transform: translateY(calc(-100vh - 150px)); 
        opacity: 0;
    }
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 1rem;
    position: relative;
    z-index: 1;
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 0.25rem;
    border-radius: 2rem;
    z-index: 100;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}


.lang-code { font-weight: 700; letter-spacing: 0.5px; }
.lang-btn.active {
    background: white;
    color: #0f172a;
}

.lang-btn:hover:not(.active) {
    color: white;
}

50% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

100% { transform: translateY(-100px) rotate(360deg); }
}

.logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin: 0;
    letter-spacing: -2px;
}

.tagline {
    color: rgba(255,255,255,0.6);
    font-size: 1.3rem;
    margin-top: 0.75rem;
    font-weight: 400;
}

.tagline em {
    color: #22d3ee;
    font-style: normal;
    font-weight: 600;
}

.main-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
}

.input-section {
    margin-bottom: 1.5rem;
}

.input-label {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    display: block;
}

.task-input {
    width: 100%;
    padding: 1.1rem 1.25rem;
    font-size: 1.05rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.2s;
    color: #0f172a;
    background: white;
}

.task-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.create-btn {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
}

/* Examples section */
.examples-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.examples-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.example-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.example-pill {
    padding: 0.55rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.example-pill:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0369a1;
    transform: translateY(-1px);
}

.show-more-btn {
    padding: 0.55rem 1rem;
    background: transparent;
    border: 1px dashed #cbd5e1;
    border-radius: 2rem;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 0.5rem;
}

.show-more-btn:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    background: #f0f9ff;
}

/* Processing State */
.processing-state {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
}

.processing-state.active {
    display: block;
}

.magic-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 2rem;
    border: 3px solid rgba(14, 165, 233, 0.2);
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0ea5e9;
    margin-bottom: 0.5rem;
}

.processing-submessage {
    font-size: 0.9rem;
    color: #64748b;
}

/* Result State */
.result-state {
    display: none;
}

.result-state.active {
    display: block;
}

.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.result-subtitle {
    font-size: 0.95rem;
    color: #64748b;
}

.tools-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.2s;
}

.tool-card.primary {
    background: linear-gradient(135deg, #f0f9ff, #ecfeff);
    border: 2px solid #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.tool-icon {
    font-size: 2.25rem;
    flex-shrink: 0;
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.tool-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #0ea5e9;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 1rem;
}

.tool-description {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.tool-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
}

.tool-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.new-task-btn {
    width: 100%;
    padding: 0.9rem;
    background: white;
    border: 2px solid #e2e8f0;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.new-task-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

@media (max-width: 640px) {
    .container {
        padding: 2rem 1rem;
        padding-top: 4rem; /* Space for language toggle */
    }

    .logo h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }

    .main-card {
        padding: 1.5rem;
    }

    .floating-q {
        font-size: 0.7rem !important;
    }
}
