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

/* Only apply body centering styles to standalone auth page, not when used as modal */
body.auth-page-standalone {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: white;
    padding: 20px;
}

/* Default body styles for when auth is used in modal */
body {
    font-family: Arial, sans-serif;
}

/* When auth is in modal, center the container differently */
.modal-overlay .auth-container {
    margin: 0 auto;
    display: block;
}

.auth-container {
    width: 100%;
    max-width: 600px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.logo-image {
    width: 200px;
    height: 100px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-image {
        width: 150px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        width:  150px;
        height: 100px;
    }
}

.title {
    font-size: 20px;
    font-weight: normal;
    color: #1a73e8;
    flex: 1;
    text-align: left;
    margin-left: 45px;
}

@media (max-width: 768px) {
    .title {
        margin-left: 10px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .title {
        margin-left: 5px;
        font-size: 16px;
    }
}

/* Messages */
.error-message,
.success-message {
    padding: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    border-radius: 4px;
    display: none;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #66bb6a;
}

/* Forms */
.form-section {
    margin-bottom: 25px;
}

.section-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-group-vertical {
    display: block;
    margin-bottom: 15px;
}

label {
    width: 140px;
    text-align: right;
    padding-right: 15px;
    font-size: 14px;
    flex-shrink: 0;
}

label .required {
    color: #e74c3c;
}

label .optional {
    color: #999;
    font-size: 12px;
}

.form-group-vertical label {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0;
    margin-bottom: 5px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.form-group-vertical .input-wrapper {
    width: 100%;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #000;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: #1a73e8;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 18px;
    user-select: none;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    padding-left: 155px;
}

.form-group-vertical .help-text {
    padding-left: 0;
}

/* Platforms autocomplete */
.platform-input-wrapper {
    position: relative;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #000;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-item.create-new {
    background: #e8f5e9;
    font-weight: bold;
}

.platforms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    min-height: 40px;
    padding: 10px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #000;
    color: white;
    border-radius: 4px;
    font-size: 13px;
}

.platform-tag.new {
    background: #2e7d32;
}

.platform-tag .remove-btn {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

.platform-tag .remove-btn:hover {
    color: #ff5252;
}

/* Buttons */
.auth-btn {
    display: block;
    width: 280px;
    margin: 20px auto;
    padding: 14px;
    border: none;
    background: #000;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

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

.auth-btn:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

/* Links */
.forgot-password {
    margin: 10px 0;
    padding-left: 140px;
}

.forgot-password a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 13px;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.remember-me {
    padding-left: 140px;
    margin-bottom: 20px;
    font-size: 13px;
}

.remember-me input {
    margin-right: 8px;
}

.toggle-form {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.toggle-form a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: bold;
}

.toggle-form a:hover {
    text-decoration: underline;
}

/* Divider */
.divider {
    text-align: center;
    margin: 25px 0;
    color: #666;
    font-size: 13px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #ccc;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* Google button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 280px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #ddd;
    background: white;
    color: #000;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.google-btn:hover {
    background: #f5f5f5;
}

.google-icon {
    width: 20px;
    height: 20px;
}

/* Show/hide forms */
.hidden {
    display: none;
}
/* Verification styles */
.verify-section {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}
.email-display {
    font-weight: bold;
    margin: 20px 0;
    color: #1a73e8;
}
.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}
.code-input {
    width: 50px;
    height: 60px;
    border: 2px solid #000;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
}
.code-input:focus {
    outline: none;
    border-color: #1a73e8;
}
.resend-link {
    color: #1a73e8;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}
.resend-link:hover {
    text-decoration: underline;
}
.platform-chips-input {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    padding: 5px;
    border: 1px solid #000;
    min-height: 42px;
    background: white;
}

.platform-chips-input:focus-within {
    border-color: #1a73e8;
}

#platformChips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #000;
    color: white;
    border-radius: 3px;
    font-size: 13px;
}

.platform-chip .remove-btn {
    cursor: pointer;
    font-weight: bold;
    margin-left: 3px;
}

.platform-chip .remove-btn:hover {
    color: #ff5252;
}

#platformInput {
    flex: 1;
    border: none;
    outline: none;
    min-width: 120px;
    padding: 5px;
}
/* Flèche de retour */
.back-arrow {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    color: #000;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto; /* Pousse vers la droite */
}

.back-arrow:hover {
    background: #f5f5f5;
    border-color: #000;
}

.header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

/* URL input rows container */
#urlFieldsContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* URL input row */
.url-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Control buttons (+ and -) */
.url-control-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    font-size: 24px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.url-control-btn:hover {
    background: #667eea;
    color: white;
}

.url-control-btn.remove-btn {
    border-color: #ef4444;
    color: #ef4444;
}

.url-control-btn.remove-btn:hover {
    background: #ef4444;
    color: white;
}