* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 600;
}

.input-section {
    margin-bottom: 30px;
}

#urlInput {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
    outline: none;
}

#urlInput:focus {
    border-color: #667eea;
}

.color-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 15px 0;
}

.color-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.color-group label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.color-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    transition: border-color 0.3s;
}

.color-group input[type="color"]:hover {
    border-color: #667eea;
}

.color-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

#generateBtn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#generateBtn:active {
    transform: translateY(0);
}

.qr-container {
    margin: 30px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 256px;
}

.qr-container canvas,
.qr-container img {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

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

.download-btn,
.ascii-btn {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.download-btn:hover,
.ascii-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.ascii-wrapper {
    margin-top: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f5f5f5;
}

.ascii-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #e8e8e8;
    border-bottom: 1px solid #d0d0d0;
    border-radius: 8px 8px 0 0;
}

.ascii-header span {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.copy-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: 1px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
}

.copy-btn.copied {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.ascii-container {
    background: transparent;
    border: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1;
    overflow-x: auto;
    white-space: pre;
    max-width: 100%;
    margin: 0;
    letter-spacing: 0;
    word-spacing: 0;
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
}

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

    h1 {
        font-size: 1.5em;
    }

    #urlInput,
    #generateBtn {
        font-size: 14px;
    }
}