/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(90deg, #74ebd5 0%, #ACB6E5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top));
    min-height: 100vh;
    box-sizing: border-box;
}

/* Main wrapper centers everything */
.main-wrapper {
    min-height: auto;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vw;
}

/* Container */
.container {
    background-color: #fff;
    width: min(95vw, 400px);
    padding: clamp(16px, 5vw, 25px) clamp(12px, 4vw, 20px);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 20px;
    box-sizing: border-box;
    gap: 50px;
}

/* Card styling */
.card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.15);
    padding: clamp(24px, 6vw, 40px);
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
}

/* Heading */
h1 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: #333;
    margin-bottom: 15px;
}

.card h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #2d3a4a;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

/* Input field */
input[type="text"] {
    width: 100%;
    padding: clamp(10px, 3vw, 12px);
    font-size: clamp(0.95rem, 2vw, 1rem);
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
    box-sizing: border-box;
}

.card input[type="text"] {
    padding: clamp(12px, 3vw, 16px);
    font-size: clamp(1rem, 2vw, 1.1rem);
    border-radius: 10px;
    border: 1px solid #bfc9d4;
    margin-bottom: 8px;
    transition: border 0.2s;
}

input[type="text"]:focus {
    border-color: #1cff3e;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.card input[type="text"]:focus {
    border-color: #74ebd5;
    box-shadow: 0 0 6px #74ebd5aa;
}

/* Result box */
#result {
    min-height: 26px;
    margin-top: 15px;
    padding: clamp(10px, 3vw, 12px);
    border-radius: 8px;
    background-color: #f9f9f9;
    color: #333;
    word-wrap: break-word;
    transition: all 0.3s ease;
    font-size: clamp(0.95rem, 2vw, 1rem);
}

/* Button group styling */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.button-group button,
#copy-btn {
    flex: 1 1 45%;
    padding: clamp(10px, 2vw, 14px);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #74ebd5 0%, #ACB6E5 100%);
    color: #2d3a4a;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
}

.button-group button:hover,
#copy-btn:hover {
    background: linear-gradient(90deg, #ACB6E5 0%, #74ebd5 100%);
    transform: scale(1.04);
}

#copy-btn {
    margin-top: 6px;
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

#copy-btn:hover {
    background: linear-gradient(90deg, #38f9d7 0%, #43e97b 100%);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .card {
        padding: 16px;
        border-radius: 8px;
        max-width: 100vw;
    }
    .main-wrapper {
        padding: 0;
    }
    .button-group {
        flex-direction: column;
        gap: 8px;
    }
    .button-group button,
    #copy-btn {
        flex: 1 1 100%;
    }
}
