/* Add these new variables and enhancements at the top of your existing CSS */
:root {
    --primary: #C17F59;
    --primary-dark: #A66B47;
    --secondary: #CD853F;
    --accent: #FFF3E0;
    --gradient: linear-gradient(135deg, #C17F59 0%, #CD853F 100%);
    --background: #FFF8F1;
    --card-bg: #ffffff;
    --text: #2D2416;
    --text-light: #6B5D4E;
    --border: #E8D5C8;
    --shadow: 0 4px 6px rgba(193, 127, 89, 0.1);
    --shadow-lg: 0 10px 15px rgba(193, 127, 89, 0.15);
    --button-color: #CD853F;
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--accent);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    padding: 40px 20px;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--background);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* Header Styles */
.header {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 40px;
    border-radius: var(--radius);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('path-to-your-logo/image.png') no-repeat center;
    background-size: contain;
    opacity: 0.1;
    pointer-events: none;
}

h1 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.progress-step {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.progress-step.active {
    background: var(--button-color);
    color: white;
}

/* Exercise Section */
.exercise-section {
    margin-bottom: 30px;
    width: 100%;
}

.exercise-title {
    color: var(--primary);
    font-size: 2rem;
    text-align: center;
    margin: 30px 0;
    font-weight: 600;
}

.level-selection,
.progression-section {
    width: 100%;
    margin-bottom: 40px;
}

.progression-section {
    margin-top: 60px;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
    width: 100%;
}

.image-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow);
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.image-box.selected {
    border: 2px solid var(--button-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.image-box.selected::after {
    content: '👍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--button-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-top: 2px;
}

.image-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.image-box img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    padding: 10px;
    flex: 1;
}

.image-box p {
    padding: 12px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    background: white;
    margin: 0;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.nav-button {
    background: var(--button-color);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
}

.nav-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

/* User Info Form */
.user-info-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.form-input {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 15px;
    transition: var(--transition);
    width: 100%;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.2);
}

/* Summary Styles */
.summary-section {
    padding: 20px;
}

.summary-title {
    text-align: center;
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 30px;
}

.user-details {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.user-details p {
    margin: 10px 0;
    color: #4a5568;
}

.category-section {
    margin-bottom: 40px;
}

.category-section h3 {
    color: #4a5568;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.summary-card h4 {
    background: var(--button-color);
    color: white;
    padding: 15px;
}

.summary-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.summary-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.summary-details {
    padding: 15px;
}

.summary-details p {
    margin: 5px 0;
    color: #4a5568;
}

.level {
    font-weight: bold;
    color: #2b6cb0;
}

.progression {
    color: #718096;
}

.summary-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Print/PDF Styles */
@media print {
    @page {
        size: landscape;
        margin: 20mm;
    }

    body {
        background: white;
        padding: 0;
        margin: 0;
    }

    .container {
        max-width: none;
        margin: 0;
        padding: 20px;
        box-shadow: none;
    }

    /* Optimize summary layout for landscape */
    .summary-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        page-break-inside: avoid;
    }

    .summary-card {
        break-inside: avoid;
        page-break-inside: avoid;
        max-height: none;
        height: auto;
    }

    .summary-image {
        height: 180px;  /* Reduced height for landscape */
    }

    .summary-image img {
        max-height: 160px;
        object-fit: contain;
        padding: 5px;
    }

    /* Ensure proper page breaks */
    .category-section {
        page-break-before: always;
        margin-top: 20px;
    }

    .category-section:first-of-type {
        page-break-before: avoid;
    }

    /* Optimize text sizes for print */
    .summary-title {
        font-size: 24pt;
        margin-bottom: 15px;
    }

    .category-section h3 {
        font-size: 18pt;
        margin-bottom: 15px;
        border-bottom: 1pt solid #000;
    }

    .summary-card h4 {
        font-size: 14pt;
        padding: 10px;
    }

    .summary-details {
        padding: 10px;
    }

    .summary-details p {
        font-size: 12pt;
        margin: 3px 0;
    }

    /* Hide unnecessary elements in print */
    .navigation,
    .progress-bar,
    .summary-actions {
        display: none !important;
    }

    /* Ensure user details print well */
    .user-details {
        margin-bottom: 20px;
        border: 1pt solid #000;
        padding: 15px;
        page-break-inside: avoid;
    }

    .user-details p {
        font-size: 12pt;
        margin: 5px 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-step {
        font-size: 0.8rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Alert Styles */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.alert-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: none;
    padding: 30px;
    text-align: center;
    min-width: 300px;
}

.alert-overlay.show .alert-box {
    transform: translateY(0);
}

.alert-title {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.alert-message {
    color: var(--text);
    margin-bottom: 25px;
    line-height: 1.5;
}

.alert-button {
    background: var(--button-color);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-weight: 600;
    margin: 0 auto;
    cursor: pointer;
    transition: var(--transition);
}

.alert-button:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
}

/* Improve Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .progress-bar {
        overflow-x: auto;
        padding: 10px 5px;
        margin: 15px 0;
        -webkit-overflow-scrolling: touch;
    }

    .progress-step {
        min-width: 120px;
        padding: 0 10px;
        white-space: nowrap;
    }

    .exercise-title {
        font-size: 1.5rem;
    }

    .image-box img {
        height: 200px;
    }

    .nav-button {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .user-info-form {
        padding: 15px;
    }

    .form-input {
        font-size: 16px; /* Prevents zoom on mobile */
        padding: 12px;
    }

    .summary-section {
        padding: 15px;
    }

    .summary-title {
        font-size: 1.8rem;
    }

    .user-details {
        padding: 15px;
    }

    .summary-card {
        margin-bottom: 15px;
    }

    .summary-card h4 {
        font-size: 1.1rem;
    }

    .alert-box {
        width: 85%;
        padding: 20px;
    }

    .alert-title {
        font-size: 1.2rem;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 480px) {
    .navigation {
        flex-direction: column;
        gap: 10px;
    }

    .nav-button {
        width: 100%;
    }

    .summary-actions {
        flex-direction: column;
        gap: 10px;
    }

    .summary-actions .nav-button {
        width: 100%;
    }
}

/* Add these new media queries */
@media (max-width: 1200px) {
    .image-box img {
        aspect-ratio: 4/3;
    }
}

@media (max-width: 768px) {
    .image-box img {
        aspect-ratio: 1/1;
    }
    
    .form-input {
        font-size: 16px; /* Prevents zoom on mobile */
    }
}

/* Enhance print styles */
@media print {
    .image-box {
        break-inside: avoid;
        page-break-inside: avoid;
        max-height: 500px;
    }

    .image-box img {
        max-height: 300px;
    }

    .summary-grid {
        page-break-inside: avoid;
    }
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhance summary cards */
.summary-card {
    transition: var(--transition);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Enhance alert styles */
.alert-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: none;
    padding: 30px;
}

.alert-button {
    background: var(--button-color);
    transition: var(--transition);
}

.alert-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    opacity: 0.95;
}

/* Add loading state styles */
.image-box.loading {
    position: relative;
}

.image-box.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Add touch feedback for mobile */
@media (hover: none) {
    .image-box:active {
        transform: scale(0.98);
    }
    
    .nav-button:active {
        transform: scale(0.95);
    }
}

/* Add ShiYo branding */
.shiyo-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.shiyo-logo img {
    height: 60px;
    width: auto;
}

.shiyo-brand {
    font-size: 2.5rem;
    color: var(--primary);
    margin-left: 15px;
    font-weight: bold;
}

/* Enhanced form styles */
.form-title {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.2);
    outline: none;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .shiyo-logo img {
        height: 40px;
    }
    
    .shiyo-brand {
        font-size: 2rem;
    }
    
    .user-info-form {
        padding: 20px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
}

/* ShiYo header styles */
.shiyo-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.shiyo-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.shiyo-logo img {
    height: 60px;
    width: auto;
}

.shiyo-brand {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.shiyo-tagline {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 10px;
    font-family: 'Poppins', sans-serif;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .shiyo-logo img {
        height: 40px;
    }

    .shiyo-brand {
        font-size: 1.8rem;
    }

    .shiyo-tagline {
        font-size: 1rem;
    }

    .image-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .image-box {
        max-width: 100%;
        aspect-ratio: 16/9;
    }

    .image-box img {
        height: auto;
        max-height: none;
        aspect-ratio: 16/9;
        object-fit: cover;
    }

    .progress-bar {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 10px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .progress-step {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .navigation {
        flex-direction: column;
        gap: 10px;
    }

    .nav-button {
        width: 100%;
    }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .exercise-title {
        font-size: 1.3rem;
    }

    .image-box.selected::after {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

/* Update mobile image box styles */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .image-box {
        max-width: 100%;
        min-height: 300px; /* Increased height for mobile */
        margin-bottom: 15px;
        box-shadow: var(--shadow-lg);
    }

    .image-box img {
        height: 250px; /* Increased height */
        width: 100%;
        object-fit: contain;
        padding: 10px;
    }

    .image-box p {
        font-size: 1.1rem; /* Larger text */
        padding: 12px;
        font-weight: 500;
    }

    /* Make selection indicator more visible on mobile */
    .image-box.selected {
        transform: scale(1.02);
        border: 3px solid var(--button-color);
    }

    .image-box.selected::after {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
}

/* Add styles for the download button */
.download-button {
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
}

.button-icon {
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .download-button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }

    .image-box {
        max-width: 100%;
        min-height: 300px;
        margin-bottom: 15px;
    }

    .image-box img {
        height: 250px;
        width: 100%;
        object-fit: contain;
        padding: 10px;
    }

    .progression-section {
        margin-top: 40px;
    }
} 