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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #333;
}

header {
    text-align: center;
    padding: 3rem 1rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.input-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.type-selector {
    margin-bottom: 2rem;
}

.type-selector label {
    font-weight: 600;
    margin-right: 1rem;
    color: #555;
}

.type-selector select {
    padding: 0.7rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 200px;
}

.type-selector select:focus {
    outline: none;
    border-color: #2a5298;
}

.input-fields {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #2a5298;
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.customization {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.customization h3 {
    margin-bottom: 1rem;
    color: #333;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.option-group label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
}

.option-group input[type="range"] {
    flex: 1;
}

.option-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.generate-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(42, 82, 152, 0.4);
}

.output-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.qr-display {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

#qrcode {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.download-options h3 {
    margin-bottom: 1rem;
    color: #333;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-buttons button {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.download-buttons button:hover {
    border-color: #2a5298;
    background: #2a5298;
    color: white;
}

.history-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.history-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.history-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.history-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.history-item img {
    width: 100px;
    height: 100px;
    margin-bottom: 0.5rem;
}

.history-item-type {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.history-item-date {
    font-size: 0.8rem;
    color: #999;
}

.tips-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.tips-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.tip-card:hover {
    background: #e9ecef;
    transform: translateY(-3px);
}

.tip-card h3 {
    margin-bottom: 0.8rem;
    color: #2a5298;
}

.tip-card p {
    color: #666;
    line-height: 1.6;
}

footer {
    background: rgba(255,255,255,0.95);
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.ad-area {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-area p {
    color: #999;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .output-section {
        grid-template-columns: 1fr;
    }
    
    .option-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}