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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    padding-bottom: 120px; /* Space for sticky buttons */
}

/* App Banner (Partiful-style) */
.app-banner {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.victor-logo {
    font-size: 20px;
}

.banner-text {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

.banner-subtext {
    font-size: 11px;
    color: #999;
    margin-left: 4px;
}

.banner-open-btn {
    background: #007AFF;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.banner-open-btn:hover {
    background: #0056CC;
}

.banner-open-btn:active {
    background: #004499;
}

/* Event Screen - Dark Theme */
.event-screen {
    background: #1a1a1a;
    min-height: calc(100vh - 60px);
    padding: 20px 16px;
}

.event-header-dark {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.event-title-dark {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.event-sport-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.event-details-scrollable {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.event-info-section {
    padding: 20px 0;
}

.info-row {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    border-bottom: 1px solid #2a2a2a;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 16px;
    color: #ffffff;
    font-weight: 500;
}

.event-description {
    font-size: 15px;
    color: #cccccc;
    line-height: 1.6;
    margin-top: 8px;
}

/* Sticky RSVP Buttons (Partiful-style) */
.rsvp-buttons-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #1a1a1a 0%, rgba(26, 26, 26, 0.95) 80%, transparent 100%);
    padding: 20px 16px 30px;
    display: flex;
    gap: 12px;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(10px);
}

.rsvp-buttons-top {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 20px 16px;
    background: #1a1a1a;
}

.rsvp-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #333;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 600;
}

.rsvp-btn:hover {
    transform: scale(1.05);
    border-color: #555;
}

.rsvp-btn-selected {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    border-color: #FF6B35;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.rsvp-emoji {
    font-size: 28px;
    margin-bottom: 4px;
}

.rsvp-text {
    font-size: 12px;
    font-weight: 600;
}

/* Details Screen */
.details-screen {
    background: #1a1a1a;
    padding: 20px 16px;
    min-height: calc(100vh - 200px);
}

.details-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #007AFF;
}

.form-group input[readonly] {
    background: #1a1a1a;
    color: #999;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* Phone Input Group (Country Code + Number) */
.phone-input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end; /* Align inputs at the bottom so they're on the same row */
}

.phone-country-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 25%; /* 25% width, don't grow or shrink */
    max-width: 25%;
}

.phone-country-group label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0;
}

.country-code-input {
    width: 100%; /* Fill the 25% container */
    padding: 14px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #000000;
    font-size: 16px;
    transition: border-color 0.2s;
}

.country-code-input:focus {
    outline: none;
    border-color: #007AFF;
}

.phone-number-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 75%; /* 75% width, don't grow or shrink */
    max-width: 75%;
}

.phone-number-group label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0;
}

.phone-number-input {
    flex: 1;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #000000;
    font-size: 16px;
    transition: border-color 0.2s;
}

.phone-number-input:focus {
    outline: none;
    border-color: #007AFF;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-cancel {
    flex: 1;
    padding: 14px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #333;
}

.btn-continue {
    flex: 1;
    padding: 14px;
    background: #007AFF;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-continue:hover {
    background: #0056CC;
}

/* Verification Screen */
.verify-screen {
    background: #1a1a1a;
    padding: 40px 20px;
    min-height: calc(100vh - 60px);
    max-width: 400px;
    margin: 0 auto;
}

.close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.close-btn:hover {
    background: #2a2a2a;
}

.verify-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 12px;
}

.verify-subtitle {
    font-size: 16px;
    color: #999;
    text-align: center;
    margin-bottom: 40px;
}

.verify-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.code-input-container {
    display: flex;
    justify-content: center;
}

.code-input {
    width: 100%;
    max-width: 300px;
    padding: 20px;
    background: #2a2a2a;
    border: 2px solid #333;
    border-radius: 12px;
    color: #ffffff;
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 8px;
    font-family: 'Courier New', monospace;
}

.code-input:focus {
    outline: none;
    border-color: #007AFF;
}

.resend-container {
    text-align: center;
    font-size: 14px;
    color: #999;
}

.resend-link {
    background: none;
    border: none;
    color: #007AFF;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

.resend-link:disabled {
    color: #666;
    cursor: not-allowed;
    text-decoration: none;
}

.btn-agree {
    width: 100%;
    padding: 16px;
    background: #2a2a2a;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.btn-agree:hover {
    background: #333;
}

.consent-text {
    font-size: 11px;
    color: #999;
    text-align: center;
    line-height: 1.5;
    margin-top: 20px;
}

.consent-text a {
    color: #007AFF;
    text-decoration: underline;
}

/* Confirmation Screen */
.confirmation-screen {
    background: #1a1a1a;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.confirmation-content {
    text-align: center;
    margin-bottom: 40px;
}

.confirmation-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.confirmation-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.confirmation-message {
    font-size: 16px;
    color: #999;
    line-height: 1.6;
}

/* My Events Section */
.my-events-section {
    margin-top: 40px;
}

.my-events-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-item {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.event-item:hover {
    background: #333;
}

.event-item-info {
    flex: 1;
}

.event-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.event-item-details {
    font-size: 14px;
    color: #999;
}

.event-item-link {
    color: #007AFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.no-events {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* Sticky Download App Button */
.download-app-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #1a1a1a 0%, rgba(26, 26, 26, 0.95) 80%, transparent 100%);
    padding: 16px;
    z-index: 998;
    backdrop-filter: blur(10px);
}

.download-app-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    transition: transform 0.2s;
}

.download-app-btn:hover {
    transform: translateY(-2px);
}

.download-app-btn:active {
    transform: translateY(0);
}

/* My Events Page */
.my-events-page {
    padding: 20px 16px;
    min-height: calc(100vh - 60px);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

.error {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
    padding: 20px;
    border-radius: 12px;
    margin: 20px;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.error-text {
    color: #FF3B30;
    text-align: center;
    padding: 20px;
}

.success {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
    padding: 20px;
    border-radius: 12px;
    margin: 20px;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

/* Home Page Styles */
header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #ffffff;
}

header p {
    font-size: 1.2rem;
    color: #999;
}

.hero {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 40px 20px;
    border: 1px solid #333;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.hero p {
    font-size: 1.1rem;
    color: #999;
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: white;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding-bottom: 140px;
    }
    
    .event-title-dark {
        font-size: 28px;
    }
    
    .rsvp-btn {
        width: 70px;
        height: 70px;
    }
    
    .rsvp-emoji {
        font-size: 24px;
    }
    
    .verify-screen {
        padding: 30px 16px;
    }
    
    .code-input {
        font-size: 28px;
        padding: 16px;
    }
    
    .phone-input-group {
        /* Keep horizontal layout on mobile too, just adjust gap */
        gap: 8px;
    }
    
    .phone-country-group {
        flex: 0 0 25%; /* Maintain 25% on mobile */
        max-width: 25%;
    }
    
    .country-code-input {
        width: 100%; /* Fill the container */
    }
    
    .phone-number-group {
        flex: 0 0 75%; /* Maintain 75% on mobile */
        max-width: 75%;
        min-width: 0; /* Allow it to shrink if needed */
    }
}

/* Prevent text zoom on input focus (iOS) */
@supports (-webkit-touch-callout: none) {
    .form-group input,
    .code-input {
        font-size: 16px !important;
    }
}

/* Touch-friendly button sizes */
@media (hover: none) and (pointer: coarse) {
    .rsvp-btn,
    .btn-continue,
    .btn-cancel,
    .btn-agree {
        min-height: 44px;
    }
}
