/**
 * Backatorp IF Poängsystem - Gemensam Stilmall
 * BIF Grafisk Profil - Röd/Vit/Svart
 * Mobile-first design
 */

/* ========== BIF Färgvariabler ========== */
:root {
    --bif-red: #C10230;
    --bif-white: #FFFFFF;
    --bif-black: #1D1D1B;
    --bif-gold: #85754E;
    --bif-grey: #888B8D;
    --bif-blue: #104862;
    --bif-green: #3fa535;
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Aptos', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ========== Layout ========== */
.container {
    max-width: 600px;
    margin: 0 auto;
}

/* ========== Header ========== */
.header {
    background: var(--bif-red);
    color: var(--bif-white);
    padding: 30px;
    text-align: center;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.header-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: var(--bif-white);
    text-decoration: none;
    font-size: 32px;
    opacity: 0.85;
    transition: opacity 0.2s;
    line-height: 1;
}

.header-icon:hover {
    opacity: 1;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: bold;
}

.header p {
    font-size: 16px;
    opacity: 0.95;
}

/* ========== Tab Navigation ========== */
.tab-menu {
    background: var(--bif-white);
    display: flex;
    border-bottom: 3px solid var(--bif-red);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-menu a {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--bif-grey);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: all 0.3s ease;
    background: #f5f5f5;
}

.tab-menu a:hover {
    background: #e8e8e8;
    color: var(--bif-black);
}

.tab-menu a.active {
    color: var(--bif-red);
    border-bottom-color: var(--bif-red);
    background: var(--bif-white);
    font-weight: 700;
}

/* ========== Forms ========== */
.registration-form {
    background: var(--bif-white);
    padding: 30px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--bif-black);
    font-size: 14px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="file"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bif-white);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--bif-red);
    box-shadow: 0 0 0 3px rgba(193, 2, 48, 0.1);
}

input::placeholder {
    color: var(--bif-grey);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888B8D' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--bif-red);
    color: var(--bif-white);
}

.btn-primary:hover {
    background: #9e0227;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(193, 2, 48, 0.3);
}

.btn-secondary {
    background: var(--bif-grey);
    color: var(--bif-white);
}

.btn-secondary:hover {
    background: #6d7072;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(136, 139, 141, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: var(--bif-white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: var(--bif-green);
    color: var(--bif-white);
}

.btn-success:hover {
    background: #358a2f;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:active {
    transform: translateY(0);
}

/* ========== Messages ========== */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--bif-green);
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ========== Winner Image Display ========== */
.winner-image {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.winner-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    .registration-form {
        padding: 20px;
    }
    
    .tab-menu a {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    input,
    select,
    textarea,
    .btn {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    
    .header {
        padding: 20px;
        border-radius: 8px 8px 0 0;
    }
    
    .registration-form {
        padding: 15px;
        border-radius: 0 0 8px 8px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}