:root {
    --bg-color: #0c0c0c;
    --card-bg: #161616;
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --radius: 16px;
    --danger: #ff4d4d;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Pretendard', sans-serif;
    line-height: 1.6;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 3.5rem;
}

header h1 {
    font-size: 2.8rem;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
    margin-bottom: 0.5rem;
}

.input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.glow-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid var(--gold);
    color: var(--gold);
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--gold-glow);
}

.glow-btn:hover {
    background: var(--gold);
    color: #000;
}

.glow-btn.recording {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(255, 77, 77, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

.text-input-container {
    display: flex;
    width: 100%;
    max-width: 550px;
    background: var(--card-bg);
    padding: 6px;
    border-radius: var(--radius);
    border: 1px solid #333;
}

#exercise-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    outline: none;
}

#add-btn {
    background: var(--gold);
    color: black;
    border: none;
    padding: 0 2rem;
    border-radius: calc(var(--radius) - 4px);
    font-weight: 700;
    cursor: pointer;
}

.workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.workout-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #222;
    transition: 0.3s;
}

.workout-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-info {
    padding: 1.5rem;
}

.card-info h3 {
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 0.8rem;
}

/* Modal UI */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: #111;
    margin: 10% auto;
    padding: 2.5rem;
    border: 1px solid #333;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    position: relative;
}

.confirm-box {
    text-align: center;
    border: 2px solid var(--gold);
}

.confirm-box h3 {
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.confirm-preview {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

.action-btn.yes { background: var(--gold); color: #000; }
.action-btn.no { background: #333; color: white; }

.outline-btn {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.email-section {
    margin-top: 2.5rem;
    display: flex;
    gap: 10px;
}

#email-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    color: white;
    padding: 1rem;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .workout-grid { grid-template-columns: 1fr; }
    header h1 { font-size: 2.2rem; }
}
