/*
 * Icon Simulator - CSS Styles
 * Copyright (c) 2025 Andrew Drake
 * Licensed under MIT License
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #2a2a2a;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
    flex-shrink: 0;
    border-radius: 12px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

header p {
    font-size: 1.1rem;
    color: #aaa;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #555;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: #3a3a3a;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #3a3a3a;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-area p {
    font-size: 1.1rem;
    color: #ccc;
}

/* Controls */
.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.size-control, .bg-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls label {
    font-weight: 600;
    color: #ccc;
}

.controls select {
    background: #444;
    color: #fff;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1rem;
}

.controls select:focus {
    outline: none;
    border-color: #667eea;
}

/* Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.preview-card {
    background: #333;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 1px solid #444;
}

.preview-card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

.preview-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #fff;
}

.icon-preview {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.icon-preview:hover {
    transform: scale(1.05);
}

.icon-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder {
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px;
}

/* Icon Styles */
.ios-standard {
    border-radius: 22.37%;
}

.samsung-rounded {
    border-radius: 33%;
}

.android-circle {
    border-radius: 50%;
}

.android-rounded {
    border-radius: 28px;
}

.android-teardrop {
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.android-teardrop img {
    transform: rotate(45deg);
}

.android-hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.square {
    border-radius: 0;
}

.rounded {
    border-radius: 16px;
}

.soft-square {
    border-radius: 8px;
}

.circle {
    border-radius: 50%;
}

.description {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Export Section */
.export-section {
    text-align: center;
    background: #333;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 40px;
}

.export-section h3 {
    margin-bottom: 10px;
    color: #fff;
}

.export-info {
    margin-top: 15px;
}

.export-info small {
    color: #888;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #444;
    color: #888;
}

footer p {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .icon-preview {
        width: 100px;
        height: 100px;
    }
    
    .preview-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .icon-preview {
        width: 120px;
        height: 120px;
    }
}

/* SVG for iOS Squircle */
svg {
    position: absolute;
    width: 0;
    height: 0;
}

/* Animation for successful upload */
@keyframes uploadSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.upload-success {
    animation: uploadSuccess 0.5s ease;
    border-color: #4CAF50 !important;
    background: #2d5a2d !important;
}
