:root {
    --background: #ffffff;
    --foreground: #000000;
    --primary: #0070f3;
    --primary-foreground: #ffffff;
    --secondary: #f4f4f7;
    --secondary-foreground: #111827;
    --muted: #f9fafb;
    --muted-foreground: #6b7280;
    --accent: #f3f4f6;
    --accent-foreground: #111827;
    --destructive: #ef4444;
    --border: #e5e7eb;
    --input: #e5e7eb;
    --ring: #3b82f6;
}

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

body {
    font-family: 'Inter', 'Apple SD Gothic Neo', Arial, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--muted);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 480px;
    background-color: var(--background);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    border: 1px solid var(--border);
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary);
}

.input-section {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

input {
    flex-grow: 1;
    padding: 0.625rem 1rem;
    border: 1px solid var(--input);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button {
    padding: 0.625rem 1rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0060d0;
}

.records-section {
    background-color: var(--secondary);
    border-radius: 0.5rem;
    padding: 1rem;
}

.records-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-foreground);
}

#recordsList {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#recordsList li {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

#recordsList li:hover {
    background-color: var(--accent);
}

@media (max-width: 480px) {
    .container {
        width: 100%;
        margin: 0;
        padding: 1rem;
    }

    .input-section {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}

/* 기존 CSS에 추가 */
.delete-btn {
    background-color: var(--destructive);
    color: white;
    border: none;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.delete-btn:hover {
    background-color: #dc2626;
}

#recordsList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 기존 CSS에 추가 */
.storage-usage-section {
    margin-top: 1rem;
    background-color: var(--secondary);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.storage-usage-bar-container {
    width: 100%;
    height: 20px;
    background-color: var(--muted);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.storage-usage-bar {
    height: 100%;
    width: 0;
    background-color: var(--primary);
    transition: width 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.storage-usage-bar::after {
    content: attr(data-usage);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 기존 CSS에 추가 */
.graph-section {
    margin-top: 1rem;
    background-color: var(--background);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.graph-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.graph-tab {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.graph-tab.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

#weightChart {
    width: 100%;
    max-height: 300px;
}

/* 기존 CSS에 추가 */
.weight-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.weight-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--background);
    border: 1px solid var(--input);
    border-radius: 0.375rem;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.weight-input-wrapper:focus-within {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

#weightInput {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 1.125rem;
    background-color: transparent;
}

.weight-unit {
    padding-right: 1rem;
    color: var(--muted-foreground);
    font-size: 1rem;
}

#addWeightBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

#addWeightBtn:hover {
    background-color: #0060d0;
}

#addWeightBtn:active {
    transform: scale(0.98);
}

.weight-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    background-color: var(--secondary);
    border-radius: 0.5rem;
    padding: 1rem;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary);
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-foreground);
} 