:root {
    --primary-color: #0066cc; /* Sophisticated Deep Blue */
    --primary-hover: #004c99;
    --accent-color: #222222;
    --bg-color: #f4f6f8; /* Slightly cooler grey */
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #5f6368;
    --border-color: #ced4da; /* Darker border for visibility */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 16px; /* More rounded */
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: linear-gradient(to bottom, #eff2f6 0%, #ffffff 100%);
    min-height: 100vh;
}

/* Header & Nav */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: none;
}

header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

header button {
    background: transparent;
    color: #065fd4;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid rgba(6, 95, 212, 0.2);
    border-radius: 18px;
}

header button:hover {
    background-color: #def1ff;
    border-color: transparent;
}

nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    padding: 0 24px;
    margin-bottom: 24px;
    position: sticky;
    top: 64px;
    z-index: 900;
}

nav button {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    padding: 16px 24px;
    margin: 0;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
}

nav button:hover {
    background-color: rgba(0,0,0,0.03);
    color: var(--text-primary);
}

nav button.active {
    border-bottom-color: var(--text-primary);
    color: var(--text-primary);
}

.container, .dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    animation: fadeIn 0.5s ease;
}

/* Cards */
.card, .club-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm); /* Added subtle shadow by default */
    transition: all 0.3s var(--transition);
}

.card { padding: 32px; margin-bottom: 24px; }

.club-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #a0aec0; /* Darker border on hover */
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Slightly wider cards */
    gap: 32px; /* More breathing room */
}

.club-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eee;
}

.club-card h3 {
    margin: 16px;
    font-size: 18px;
    font-weight: 600;
}
.club-card p {
    margin: 0 16px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    height: 42px;
    overflow: hidden; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.club-card button {
    margin: 0 16px 20px;
    width: calc(100% - 32px);
    background-color: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 500;
}
.club-card button:hover {
    background-color: #ececec;
}

/* Detail Page Override */
#section-club-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.club-detail-page {
    position: relative;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.detail-hero-wrapper {
    position: relative;
    height: 350px;
    width: 100%;
    background: black;
}

.detail-hero-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.detail-content-wrapper {
    padding: 32px;
    position: relative;
}

.detail-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.detail-header-row h2 {
    font-size: 28px;
    margin: 0;
}

.detail-description {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    white-space: pre-wrap;
    margin-bottom: 40px;
}

/* Floating/Action Buttons */
.btn-primary {
    background-color: #000;
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.btn-primary:hover {
    transform: scale(1.05);
    background-color: #333;
}
.btn-secondary {
    background: transparent;
    border: 1px solid #ccc;
    color: #333;
    padding: 8px 16px;
    border-radius: 18px;
    cursor: pointer;
}

/* Form Elements */
input[type="text"], input[type="password"], textarea, select, input[type="datetime-local"], input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.2s;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1); /* Matched to new primary blue */
}

button {
    cursor: pointer;
    font-family: inherit;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:hover {
    background-color: #358cdb; /* Slightly darker shade of primary */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
}

/* Specific button styles to override generic button if needed */
.btn-primary {
    background-color: #000;
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: scale(1.05);
    background-color: #333;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #ccc;
    color: #333;
    padding: 8px 16px;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: none;
}
.btn-secondary:hover {
    background-color: rgba(0,0,0,0.05);
    box-shadow: none;
}

/* Modals */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%; 
    max-width: 550px;
    box-shadow: var(--shadow-md);
    position: relative;
    transform: translateY(20px);
    animation: slideUp 0.3s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { transform: translateY(0); } }

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.close:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Tables */
table {
    width: 100%;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
th {
    background: #f1f1f1;
    font-weight: 600;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-secondary);
}
td {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}
tr:hover td {
    background-color: #fcfcfc;
}

/* Login Page Only */
.login-container {
    max-width: 440px;
    margin: 10vh auto;
    padding: 48px;
    background: white;
    border-radius: 24px; /* More rounded */
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.06); /* Shadow + Border Ring */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    /* Top accent bar */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), #00c6ff);
}

.login-container h1 { 
    font-size: 28px; 
    margin-bottom: 12px; 
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -0.5px;
}

.login-container p { 
    color: var(--text-secondary); 
    margin-bottom: 32px;
    font-size: 15px; 
}

.login-container .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.login-container input {
    margin-bottom: 0;
    background: #f8f9fa;
}
.login-container input:focus {
    background: white;
}

.login-container button {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

.login-container button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 102, 204, 0.3);
}

.login-container .links {
    margin-top: 24px;
    font-size: 14px;
}

.login-container .links a {
    color: var(--text-secondary);
    text-decoration: none; 
    font-weight: 500;
}
.login-container .links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* App Cards for My Applications UI */
.app-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color); /* Visible Border */
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: all 0.3s var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-sizing: border-box;
}

.app-card:hover { /* Stronger hover effect */
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #a0aec0;
}

.app-card h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.app-card p {
    margin: 0 0 20px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.app-card p strong {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(62, 166, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.app-card button {
    width: 100%;
    margin-top: auto;
    background-color: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
}

.app-card button:hover {
    background-color: #ececec;
}

.app-card button[disabled] {
    background-color: #f5f5f5;
    color: #999;
    border: none;
}

/* Status Buttons Specific Styles */
.app-card button.btn-action {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
}
.app-card button.btn-action:hover {
    background-color: #358cdb;
}

.app-card button.btn-primary-action {
    background-color: #000;
    color: white;
}
.app-card button.btn-primary-action:hover {
    background-color: #333;
}

.app-card button.btn-confirmed {
    background-color: #4caf50;
    color: white;
    opacity: 0.9;
    cursor: default;
}
.app-card button.btn-confirmed[disabled] {
    background-color: #4caf50;
    color: white;
}

.app-card button.btn-disabled {
    cursor: not-allowed;
}
