body {
    font-family: 'Segoe UI', Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1563986768609-322da39675d5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') center/cover no-repeat;
    opacity: 0.1;
    z-index: -1;
}

.container {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

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

h1 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.8em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    font-weight: 700;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4a90e2, transparent);
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
}

input {
    padding: 15px 20px;
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.clear-button {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clear-button:hover {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2;
}

button {
    padding: 15px 30px;
    background: linear-gradient(45deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    background: linear-gradient(45deg, #357abd, #4a90e2);
}

#result {
    margin-top: 40px;
    padding: 30px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

#result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(74, 144, 226, 0.05), transparent);
    z-index: -1;
}

#result h2 {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 2em;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

#result h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #4a90e2, #357abd);
    border-radius: 3px;
}

#result p {
    margin: 15px 0;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

#result p::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(74, 144, 226, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

#result p:hover::before {
    transform: translateX(100%);
}

#result p:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#result strong {
    color: #4a90e2;
    min-width: 150px;
    font-weight: 600;
}

.error {
    color: #ff6b6b;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 107, 107, 0.1);
    margin-top: 20px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    text-align: center;
    font-weight: 500;
}

.country-flag {
    width: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    vertical-align: middle;
    margin-right: 8px;
    object-fit: cover;
}

/* Планшеты */
@media screen and (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 25px;
    }

    h1 {
        font-size: 2.2em;
        margin-bottom: 30px;
    }

    .input-group {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    input {
        width: 100%;
        max-width: 300px;
    }

    button {
        width: 100%;
        max-width: 300px;
    }

    #result {
        padding: 20px;
    }

    #result h2 {
        font-size: 1.8em;
    }

    #result p {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #result strong {
        min-width: auto;
    }
}

/* Телефоны */
@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
        margin-bottom: 25px;
    }

    input {
        font-size: 14px;
        padding: 12px 15px;
    }

    button {
        font-size: 14px;
        padding: 12px 20px;
    }

    #result {
        padding: 15px;
    }

    #result h2 {
        font-size: 1.5em;
    }

    #result p {
        font-size: 14px;
        padding: 12px;
    }

    .country-flag {
        width: 25px;
        margin-right: 5px;
        vertical-align: middle;
    }

    #result p strong {
        display: block;
        margin-bottom: 5px;
    }

    #result p:has(.country-flag) {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    #result p:has(.country-flag) strong {
        display: inline;
        margin-bottom: 0;
    }
} 