/* One <style> block, lifted in place. Separate per block: merging
   blocks changes which rule wins. */

* {
            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;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .converter-container {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            max-width: 600px;
            width: 100%;
            transition: transform 0.3s ease;
        }

        .converter-container:hover {
            transform: translateY(-5px);
        }

        .title {
            text-align: center;
            color: #333;
            margin-bottom: 10px;
            font-size: 2.2em;
            font-weight: 600;
        }

        .subtitle {
            text-align: center;
            color: #666;
            margin-bottom: 30px;
            font-size: 1.1em;
        }

        .currency-flags {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
            font-size: 3em;
        }

        .swap-button {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            border-radius: 50%;
            width: 60px;
            height: 60px;
            font-size: 1.5em;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 20px;
        }

        .swap-button:hover {
            transform: rotate(180deg) scale(1.1);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
        }

        .currency-cards {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 25px;
            margin-bottom: 25px;
        }

        .currency-card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            border: 2px solid transparent;
            transition: all 0.3s ease;
        }

        .currency-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        }

        .currency-card.active {
            border-color: #667eea;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
        }

        .currency-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .currency-flag {
            font-size: 2.2em;
            margin-right: 12px;
        }

        .currency-info h3 {
            color: #333;
            font-size: 1.2em;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .currency-info p {
            color: #888;
            font-size: 0.9em;
        }

        .input-container {
            position: relative;
        }

        input[type="number"] {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #e0e0e0;
            border-radius: 12px;
            font-size: 1.4em;
            font-weight: 600;
            transition: all 0.3s ease;
            background: white;
        }

        input[type="number"]:focus {
            border-color: #667eea;
            outline: none;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .result {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 20px;
            border-radius: 12px;
            text-align: center;
            margin-top: 20px;
            font-size: 1.1em;
            min-height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .exchange-rate {
            text-align: center;
            margin-top: 15px;
            color: #666;
            font-size: 0.9em;
        }

        .last-updated {
            text-align: center;
            margin-top: 10px;
            color: #999;
            font-size: 0.8em;
        }

        .loading {
            display: none;
            text-align: center;
            color: #667eea;
            margin-top: 10px;
        }

        .error {
            background: #ff6b6b;
            color: white;
            padding: 10px;
            border-radius: 8px;
            text-align: center;
            margin-top: 10px;
            display: none;
        }

        .clear-button {
            display: block;
            margin: 15px auto 0;
            padding: 8px 20px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.9em;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .clear-button:hover {
            background: #5a6fd8;
        }

        @media (max-width: 768px) {
            .converter-container {
                padding: 25px;
            }
            
            .title {
                font-size: 1.8em;
            }
            
            .currency-flags {
                font-size: 2.5em;
            }

            .currency-cards {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            
            .swap-button {
                width: 50px;
                height: 50px;
                font-size: 1.2em;
                margin: 15px;
            }

            input[type="number"] {
                font-size: 1.2em;
                padding: 12px 15px;
            }
        }
