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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-svg {
    width: 40px;
    height: 40px;
}

.site-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #CE1126;
}

.main-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    background: #f0f0f0;
}

.nav-link.active {
    background: #CE1126;
    color: white;
}

.logout-link {
    color: #CE1126;
}

.notification-badge {
    background: #CE1126;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.notification-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #CE1126;
    border-radius: 50%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
}

.mobile-menu {
    display: none;
    background: white;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    padding: 15px;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu a {
    text-decoration: none;
    color: #333;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu a:hover {
    background: #f0f0f0;
}

/* Footer */
.main-footer {
    background: rgba(255, 255, 255, 0.95);
    margin-top: 40px;
    padding: 30px 20px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    margin-bottom: 15px;
}

.footer-brand p {
    margin: 5px 0;
}

.footer-brand strong {
    color: #CE1126;
}

.footer-brand a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.footer-info {
    color: #666;
    font-size: 0.9rem;
}

/* Auth Container */
.auth-container {
    max-width: 450px;
    margin: 50px auto;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.auth-container h1 {
    text-align: center;
    color: #CE1126;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #CE1126;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #CE1126;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
}

.required {
    color: #CE1126;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #CE1126;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #a00e1e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(206, 17, 38, 0.3);
}

.btn-secondary {
    background: #667eea;
    color: white;
}

.btn-secondary:hover {
    background: #5568d3;
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #060;
}

.alert-warning {
    background: #fffbea;
    border: 1px solid #ffd700;
    color: #856404;
}

/* Dashboard */
.dashboard-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.dashboard-container h2 {
    color: #CE1126;
    margin-bottom: 25px;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
}

.stat-label {
    font-size: 1rem;
    margin-top: 5px;
    opacity: 0.9;
}

/* Profile */
.profile-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.profile-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.profile-section h3 {
    color: #CE1126;
    margin-bottom: 10px;
}

.section-note {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.current-profile-summary {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

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

.summary-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.summary-section h4 {
    color: #667eea;
    margin-bottom: 15px;
}

.summary-section p {
    margin: 8px 0;
}

/* Matches */
.matches-section {
    margin-top: 30px;
}

.matches-section h3 {
    color: #333;
    margin-bottom: 20px;
}

.no-matches {
    background: #f9f9f9;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    color: #666;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.match-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

.match-card.new-match {
    border-color: #CE1126;
    box-shadow: 0 0 20px rgba(206, 17, 38, 0.2);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.new-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #CE1126;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.match-header h4 {
    color: #333;
    flex: 1;
}

.match-date {
    font-size: 0.85rem;
    color: #666;
}

.match-details {
    margin-bottom: 20px;
}

.detail-section {
    margin-bottom: 15px;
}

.detail-section strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.detail-section p {
    color: #333;
    margin: 3px 0;
}

.school-name {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.match-actions {
    text-align: center;
}

/* Messages */
.messages-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    min-height: 600px;
}

.conversations-sidebar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.conversations-sidebar h3 {
    color: #CE1126;
    margin-bottom: 20px;
}

.no-conversations {
    text-align: center;
    color: #666;
    padding: 20px;
}

.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conversation-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    display: block;
}

.conversation-item:hover {
    background: #e9e9e9;
}

.conversation-item.active {
    background: #CE1126;
    color: white;
}

.conversation-name {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.conversation-time {
    font-size: 0.85rem;
    opacity: 0.7;
}

.unread-badge {
    background: #667eea;
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.messages-main {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.no-conversation-selected {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.conversation-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.conversation-header h3 {
    color: #CE1126;
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    max-height: 400px;
}

.no-messages {
    text-align: center;
    color: #666;
    padding: 40px;
}

.message {
    margin-bottom: 15px;
    max-width: 70%;
}

.message.sent {
    margin-left: auto;
}

.message.received {
    margin-right: auto;
}

.message-content {
    padding: 12px 18px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.sent .message-content {
    background: #CE1126;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received .message-content {
    background: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
    padding: 0 18px;
}

.message.sent .message-time {
    text-align: right;
}

.message-form {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.message-input-group {
    display: flex;
    gap: 10px;
}

.message-input-group textarea {
    flex: 1;
    resize: none;
    font-family: inherit;
}

.message-input-group .btn {
    width: auto;
    white-space: nowrap;
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .site-title {
        font-size: 1rem;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .auth-container {
        margin: 20px auto;
        padding: 30px 20px;
    }

    .dashboard-container,
    .profile-container {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }

    .messages-container {
        grid-template-columns: 1fr;
    }

    .conversations-sidebar {
        max-height: 300px;
        overflow-y: auto;
    }

    .message {
        max-width: 85%;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
    .logo-svg {
        width: 30px;
        height: 30px;
    }

    .site-title {
        font-size: 0.9rem;
    }

    .header-container {
        padding: 10px 15px;
    }

    .container {
        padding: 10px;
    }

    .auth-container {
        padding: 20px 15px;
    }

    .auth-container h1 {
        font-size: 1.5rem;
    }

    .dashboard-container,
    .profile-container {
        padding: 15px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .match-header {
        flex-direction: column;
    }

    .new-badge {
        top: 10px;
        right: 10px;
    }

    .message {
        max-width: 90%;
    }

    .message-input-group {
        flex-direction: column;
    }

    .message-input-group .btn {
        width: 100%;
    }

    .footer-brand {
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .mobile-menu {
        display: none;
    }

    body {
        background: white;
    }

    .container {
        max-width: 100%;
    }
}
