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

body {
    font-family: '微軟正黑體', 'Microsoft JhengHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f9;
}

header {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.container {
    display: grid;
    grid-template-areas: 
        "models models"
        "controls controls"
        "model info";
    grid-template-columns: 2fr 1fr;
    grid-gap: 2rem;
}

@media (max-width: 768px) {
    .container {
        grid-template-areas: 
            "models"
            "controls"
            "model"
            "info";
        grid-template-columns: 1fr;
    }
}

.model-selection {
    grid-area: models;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.model-btn {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.model-btn:hover {
    background-color: #2c3e50;
}

.model-btn.active {
    background-color: #e74c3c;
}

.controls {
    grid-area: controls;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

#phone-model-container {
    grid-area: model;
    height: 500px;
    background-color: #ecf0f1;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    display: none;
}

.phone-info {
    grid-area: info;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

button:active {
    transform: translateY(1px);
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #2c3e50;
    color: white;
    margin-top: 2rem;
}