@charset "utf-8";

/* Main stylesheet */
:root {
    --primary-color: #53b6c5;
    --secondary-color: #6aebff;
    --text-color: #333;
    --text-muted: #666;
    --background: #f5f5f5;
    --white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 0.2rem;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 36px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.32rem;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.main-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.content-wrapper {
    padding: 1rem 0 1.5rem 0;
}

/* Header */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 1rem;
}

.header-content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.3rem;
    height: 100%;
}

.logo {
    height: 0.7rem;
}

.logo img {
    height: 100%;
    width: auto;
}

/* Navigation */
.main-nav {
    display: flex;
    list-style: none;
    gap: 0.4rem;
}

.nav-item {
    font-size: 0.28rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.1rem 0.2rem;
    border-radius: var(--radius);
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
    background: rgba(83, 182, 197, 0.1);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 0.3rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0.3rem;
    font-weight: 600;
}

.card-body {
    padding: 0.3rem;
}

.card-footer {
    padding: 0.2rem 0.3rem;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.26rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(83, 182, 197, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-small {
    padding: 0.15rem 0.3rem;
    font-size: 0.24rem;
}

.btn-large {
    padding: 0.3rem 0.6rem;
    font-size: 0.32rem;
}

/* Grid system */
.grid {
    display: grid;
    gap: 0.3rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Flex utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

/* Spacing utilities */
.m-0 { margin: 0; }
.m-1 { margin: 0.2rem; }
.m-2 { margin: 0.4rem; }
.m-3 { margin: 0.6rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.2rem; }
.mt-2 { margin-top: 0.4rem; }
.mt-3 { margin-top: 0.6rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.2rem; }
.mb-2 { margin-bottom: 0.4rem; }
.mb-3 { margin-bottom: 0.6rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.2rem; }
.p-2 { padding: 0.4rem; }
.p-3 { padding: 0.6rem; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-color); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--white); }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* Border utilities */
.border { border: 1px solid var(--border-color); }
.border-0 { border: none; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: 0.3rem; }

/* Background utilities */
.bg-white { background: var(--white); }
.bg-primary { background: var(--primary-color); }
.bg-light { background: #f8f9fa; }

/* Shadow utilities */
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

/* Responsive design */
@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 32px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        padding: 0 0.2rem;
    }
}
