@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&display=swap');

:root {
    --autobot-color: #FF4500;
    --decepticon-color: #5C00CC;
    --dark-metal: #2a2a2a;
    --light-metal: #888888;
    --highlight: #FFCC00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}

body {
    background-color: #111111;
    color: #f5f5f5;
    background-image: radial-gradient(circle at 50% 50%, #222222 0%, #111111 100%);
    min-height: 100vh;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header h1 {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    color: transparent;
    background: linear-gradient(to right, var(--autobot-color), var(--decepticon-color));
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

.faction-logos {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 20px;
}

.autobot-logo, .decepticon-logo {
    width: 60px;
    height: 60px;
}

.autobot-logo {
    background: var(--autobot-color);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 12.68l-203.5 122.1v242.6l203.5 122.1 203.5-122.1v-242.6l-203.5-122.1zm0 99.55l117.1 70.35L256 253.1 138.9 182.6l117.1-70.37zm-155.8 92.33l141.3 85-0.5 171.5-140.8-84.7v-171.8zm311.6 0v171.8l-140.8 84.7-0.5-171.5 141.3-85z'/%3E%3C/svg%3E") no-repeat center center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 12.68l-203.5 122.1v242.6l203.5 122.1 203.5-122.1v-242.6l-203.5-122.1zm0 99.55l117.1 70.35L256 253.1 138.9 182.6l117.1-70.37zm-155.8 92.33l141.3 85-0.5 171.5-140.8-84.7v-171.8zm311.6 0v171.8l-140.8 84.7-0.5-171.5 141.3-85z'/%3E%3C/svg%3E") no-repeat center center / contain;
}

.decepticon-logo {
    background: var(--decepticon-color);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 11.43l-89.6 50.7-114.6-9.07 70.1 93.17-70.1 93.2 114.6-9.1 89.6 50.7v-269.6zm0 0v269.6l89.6-50.7 114.6 9.1-70.1-93.2 70.1-93.17-114.6 9.07-89.6-50.7zm-136.8 333.27l-70.8 54 137.4 78 213.8-230.6-127.8 36.5-151.6 62.1zm273.6 0l70.8 54-137.4 78-213.8-230.6 127.8 36.5 151.6 62.1z'/%3E%3C/svg%3E") no-repeat center center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 11.43l-89.6 50.7-114.6-9.07 70.1 93.17-70.1 93.2 114.6-9.1 89.6 50.7v-269.6zm0 0v269.6l89.6-50.7 114.6 9.1-70.1-93.2 70.1-93.17-114.6 9.07-89.6-50.7zm-136.8 333.27l-70.8 54 137.4 78 213.8-230.6-127.8 36.5-151.6 62.1zm273.6 0l70.8 54-137.4 78-213.8-230.6 127.8 36.5 151.6 62.1z'/%3E%3C/svg%3E") no-repeat center center / contain;
}

.input-section {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid var(--light-metal);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, select, textarea, button {
    padding: 12px 15px;
    border-radius: 5px;
    background-color: var(--dark-metal);
    border: 1px solid var(--light-metal);
    color: #f5f5f5;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input::placeholder, select::placeholder, textarea::placeholder {
    color: #aaaaaa;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--highlight);
    box-shadow: 0 0 8px var(--highlight);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    background: linear-gradient(to right, var(--autobot-color), var(--decepticon-color));
    color: white;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none !important;
}

#loading {
    text-align: center;
    padding: 50px 0;
}

.transforming-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    animation: pulse 1.5s infinite;
    color: var(--highlight);
}

.transform-animation {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border: 8px solid transparent;
    border-radius: 50%;
    border-top: 8px solid var(--autobot-color);
    border-bottom: 8px solid var(--decepticon-color);
    animation: spin 2s linear infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#results {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid var(--light-metal);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
}

.transformer-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .transformer-container {
        flex-direction: row;
    }
}

.transformer-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    position: relative;
}

.transformer-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    transition: opacity 0.7s ease;
}

.transform-button {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to right, var(--autobot-color), var(--decepticon-color));
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transform-button:hover {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.05);
}

.transformer-mode-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--highlight);
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 10;
}

.transform-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--highlight) 0%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.transform-effect.active {
    animation: transform-flash 0.7s ease-out;
}

@keyframes transform-flash {
    0% { opacity: 0; }
    50% { opacity: 0.8; }
    100% { opacity: 0; }
}

.profile-card {
    background-color: var(--dark-metal);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.profile-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: var(--highlight);
}

.profile-faction {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 15px;
    right: 15px;
}

.autobot .profile-faction {
    background: var(--autobot-color);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 12.68l-203.5 122.1v242.6l203.5 122.1 203.5-122.1v-242.6l-203.5-122.1zm0 99.55l117.1 70.35L256 253.1 138.9 182.6l117.1-70.37zm-155.8 92.33l141.3 85-0.5 171.5-140.8-84.7v-171.8zm311.6 0v171.8l-140.8 84.7-0.5-171.5 141.3-85z'/%3E%3C/svg%3E") no-repeat center center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 12.68l-203.5 122.1v242.6l203.5 122.1 203.5-122.1v-242.6l-203.5-122.1zm0 99.55l117.1 70.35L256 253.1 138.9 182.6l117.1-70.37zm-155.8 92.33l141.3 85-0.5 171.5-140.8-84.7v-171.8zm311.6 0v171.8l-140.8 84.7-0.5-171.5 141.3-85z'/%3E%3C/svg%3E") no-repeat center center / contain;
}

.decepticon .profile-faction {
    background: var(--decepticon-color);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 11.43l-89.6 50.7-114.6-9.07 70.1 93.17-70.1 93.2 114.6-9.1 89.6 50.7v-269.6zm0 0v269.6l89.6-50.7 114.6 9.1-70.1-93.2 70.1-93.17-114.6 9.07-89.6-50.7zm-136.8 333.27l-70.8 54 137.4 78 213.8-230.6-127.8 36.5-151.6 62.1zm273.6 0l70.8 54-137.4 78-213.8-230.6 127.8 36.5 151.6 62.1z'/%3E%3C/svg%3E") no-repeat center center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 11.43l-89.6 50.7-114.6-9.07 70.1 93.17-70.1 93.2 114.6-9.1 89.6 50.7v-269.6zm0 0v269.6l89.6-50.7 114.6 9.1-70.1-93.2 70.1-93.17-114.6 9.07-89.6-50.7zm-136.8 333.27l-70.8 54 137.4 78 213.8-230.6-127.8 36.5-151.6 62.1zm273.6 0l70.8 54-137.4 78-213.8-230.6 127.8 36.5 151.6 62.1z'/%3E%3C/svg%3E") no-repeat center center / contain;
}

.profile-stats {
    margin-bottom: 20px;
}

.stat {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.stat span {
    width: 100px;
    font-size: 0.9rem;
}

.stat-bar {
    flex: 1;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.autobot .stat-bar div {
    height: 100%;
    background: var(--autobot-color);
    border-radius: 5px;
}

.decepticon .stat-bar div {
    height: 100%;
    background: var(--decepticon-color);
    border-radius: 5px;
}

.profile-details {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.profile-details p {
    margin-bottom: 10px;
    line-height: 1.4;
}

.allies-section {
    margin-top: 40px;
    margin-bottom: 30px;
}

.allies-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: var(--highlight);
    text-align: center;
}

.ally-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.ally-card {
    background-color: var(--dark-metal);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ally-card:hover {
    transform: translateY(-5px);
}

.ally-icon {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 10px;
    right: 10px;
}

.ally-name {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1rem;
}

.ally-function {
    font-size: 0.8rem;
    color: #aaaaaa;
    margin-bottom: 10px;
}

.ally-image {
    width: 100%;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ally-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#new-transformer-btn {
    width: 100%;
    font-size: 1.2rem;
    padding: 15px;
}

#customize-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--dark-metal);
    border: 2px solid var(--light-metal);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    z-index: 100;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.customize-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.customize-header h3 {
    color: var(--highlight);
    margin: 0;
    font-size: 1.5rem;
}

.close-button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.customize-section {
    margin-bottom: 20px;
}

.customize-section h4 {
    color: white;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.customize-option {
    margin-bottom: 15px;
}

.customize-option label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.customize-option input,
.customize-option select,
.customize-option textarea {
    width: 100%;
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: 10px;
    vertical-align: middle;
    border: 1px solid white;
}

#save-customizations-btn {
    width: 100%;
    margin-top: 20px;
    background: linear-gradient(to right, var(--autobot-color), var(--decepticon-color));
}

.actions-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px;
}

#customize-btn, #new-transformer-btn {
    flex: 1;
}

#battle-container {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--light-metal);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
    margin-top: 20px;
    text-align: center;
}

#battle-container h2 {
    color: var(--highlight);
    margin-bottom: 20px;
}

#battle-log {
    background-color: rgba(0, 0, 0, 0.5);
    color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    height: 200px;
    overflow-y: auto;
    text-align: left;
}

#battle-container button {
    margin: 5px;
    padding: 10px 15px;
    font-size: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .faction-logos {
        gap: 30px;
    }
    
    .autobot-logo, .decepticon-logo {
        width: 40px;
        height: 40px;
    }
    
    .transformer-container {
        flex-direction: column;
    }
    
    .ally-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}