@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    background-color: #f5f5f5;
    color: #333;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    margin: auto 0;
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
}

h1 {
    color: #075e54;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    #country {
        width: 100% !important;
    }
    
    #country-code-display {
        justify-content: center;
        padding: 12px !important;
    }
}

select, input, button, textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    select, input, button, textarea {
        font-size: 16px;
        padding: 14px 12px;
    }
    
    button, .copy-btn {
        padding: 14px !important;
        font-size: 16px !important;
    }
}

select {
    width: 200px;
    background-color: white;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

input {
    flex: 1;
    min-width: 0;
}

button {
    background-color: #25D366;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

button:active {
    transform: scale(0.98);
}

button:hover {
    background-color: #128C7E;
}

.result {
    margin-top: 20px;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 5px;
    display: none;
    word-break: break-word;
    -webkit-overflow-scrolling: touch;
}

.result a {
    color: #075e54;
    word-break: break-all;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    padding: 5px 0;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

.result a:hover {
    text-decoration: underline;
}

.copy-btn {
    background-color: #34b7f1;
    margin-top: 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.copy-btn:hover {
    background-color: #1289c7;
}

/* Welcome Modal Styles */
.welcome-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    z-index: 1000;
    white-space: pre-line;
    line-height: 1.6;
    border: 2px solid #25D366;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

@media (max-width: 480px) {
    .welcome-modal {
        padding: 15px;
        max-width: 90%;
    }
}

.welcome-message {
    margin-bottom: 20px;
}

.welcome-close-btn {
    padding: 10px 15px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.2s;
    -webkit-appearance: none;
}

.welcome-close-btn:active {
    transform: scale(0.98);
}
